square/qunit-bdd — pull request #18 by dsawardekar (2014-07-01 16:13:35+00:00)
Title: Adds `it.async` DSL for testing async operations.

Async tests should return a Promise object. This code wraps the `it`
function body into a wrapper that calls `QUnit.start` and `QUnit.stop`
as required when the promise resolves or rejects.

The signature is, `it.async(description, body[, timeout])`

The default timeout is 1 second. If you pass a third argument, it
becomes the time (in ms) to wait until the promise resolves.

Example:

```javascript
it.async('with model that returns a promise', function() {
var promise = model.find('foo').then(function(result) {
expect(result).to.equal('foo');
});

return promise;
});
```