visionmedia/mocha — pull request #942 by jpbochi (2013-07-31 19:08:29+00:00)
Title: Allow async tests to optionally pass a verify fn to done() to improve error reporting

Currently, a test like this:
```
test('foo', function (done) {
myAsyncFn(function (err, result) {
expect('mocha is good').to.equal('mocha is awesome');
done(err);
});
});
```

Will yield this not so awesome output:

```
Uncaught Error: expected 'mocha is good' to equal 'mocha is awesome' (http://localhost:###/**/expect.js:99)
```

---

With this pull request, you can slightly change the test to this:
```
test('foo', function (done) {
myAsyncFn(function (err, result) {
done(function () {
expect('mocha is good').to.equal('mocha is awesome');
done();

});
});
```

```
actual expected
"mocha is awesomegood"
```