pivotal/jasmine — pull request #531 by stevecj (2014-02-27 10:36:12+00:00)
Title: Asynchronous test functions with continuations.

Allow spec function argument to be used as "done()" function or "async" object with done() and continuation() members. async.continuation() wraps a function so that it can be called asynchronously and have the same user context (this) as the spec function within which it was constructed.

Errors thrown from within a wrapped continuation function should also be handled in the same way as they would have been if thrown from the spec function. I have not figured out the appropriate way to add test coverage for that though (so it might not be working) and I expect this PR to not be acceptable for merge yet for that reason. I'm making the PR now though in hopes of getting feedback on what I have done so far (including tips on how I should add the missing coverage).