visionmedia/expresso — pull request #172 by danielbeardsley (2012-10-08 07:56:16+00:00)
Title: Improve assertion messages in uncaught exceptions

Wrap all assert.* methods in a try/catch that appends the
current test to the Error object and rethrows.

This allows us to get the corresponding Test object in the
`uncaughtException` event.

Before:

uncaught undefined: AssertionError: 'blah' === 'blahs'
at Blah. (/home/user/test.js:15:17)
...

After:

test.js testing blah(): AssertionError: 'blah' === 'blahs'
at Blah. (/home/user/test.js:15:17)
...