mozilla/fxa-auth-server — pull request #360 by rfk (2013-11-28 01:55:16+00:00)
Title: Experiment with some "test+promise helpers" to avoid uncaught errors.

A first stab at #335 based on suggestion from @chilts. I was hoping for even less boilerplate, but don't know enough about the nitty-gritty of promises to know what's feasible or appropriate.

Part of the point of having both a "succeed" and a "fail" helper is that you should never call "t.end()" from within the promise chain itself. That means we can easily grep for places where we're not using the helpers, and any fresh tests that forget the helpers will immediately show up as a test timeout.

(Also, "helpers" is a dumb name but I'm not feeling terribly inspired right now - suggestions welcome!)

@dannycoates what do you think of something like this?