visionmedia/mocha — pull request #111 by garth (2011-12-02 23:49:46+00:00)
Title: Added optional support for setting global hooks in the browser during setup

Example:

mocha.setup('bdd', {
fail: function(test) { console.log(test); },
end: function(status) { console.log(status); }
});

mocha.run();

Useful for custom actions on success/failure/completion such as sending status to the server when auto-running a suite in multiple browsers