visionmedia/mocha — pull request #315 by fabiomcosta (2012-03-14 01:56:17+00:00)
Title: Improving error message for async tests

See here: http://jsfiddle.net/fabiomcosta/PmgEV/2/
This link illustrates what this patch does to the `done` function.

Currently, the error message for an async test, on the browser, is: "Script error." (tested on chrome and firefox).
With this patch, the message becomes what was expected.

Note that it's backwards compatible but needs a change on the current way `done` is used. You will need to pass the asynchronous function as an argument to the `done` function, instead of calling `done` inside the asynchronous function. But the current error message is useless.

Thoughts?