Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 1.45 KB

ResultNow.mediawiki

File metadata and controls

42 lines (33 loc) · 1.45 KB

Notes for an API to retrieve the result of a Deferred synchronously

`resultNow` is a function which accepts a `Deferred` and returns the result of the `Deferred`. It is an error if the `Deferred` does not have a result yet. It is intended to simplify unit tests for cases where a `Deferred` is required to have a result at a particular time.

We now have a way of doing this, that is accessible on `TestCase`.

Use cases:

The latter half of

can be rewritten more simply: