mochajs/mocha — pull request #1450 by duncanbeevers (2014-11-25 16:34:13+00:00)
Title: Async errors from sync tests

We recently encountered an issue where a test was written synchronously (no `done` argument) but failed to return a promise.

The test in question was failing an assertion, but after its success was already reported. The failure was tallied, and so we saw one failure reported in the UI, but had no connection between that number and the source of the failure.

This change first exposes a `wasAlreadyDone` property on the test instance, and second, re-displays the failing test in the html reporter when the runner emits a `fail` event.