Add your own uncaught exception handling to your test file either via the uncaughtException
event:
process.on('uncaughtException', function(err) {
console.error(err.stack);
});
Or by creating a domain and adding process
to it (or whatever event emitter(s) your tests use) so that you can catch the errors that occur within your use of process.nextTick
:
var dom = require('domain').create();
dom.add(process);
dom.on('error', function(err) {
console.error(err.stack);
});
Either way, you'll then get console output that looks like:
ReferenceError: a is not defined
at testMe (/home/test/test.js:24:3)
at /home/test/test.js:18:9
at process._tickDomainCallback (node.js:459:13)