One of the points of using NodeUnit is to write new functions and test them often. Problem is, if one of the tested functions throws an error (including JS runtime errors), the error is not shown to the user. Here is the simplest possible test case: (Note that a.b.c.d will cause a runtime error)
exports.all = {
one: function( test ){
test.done();
},
two: function( test ){
as( function( err, res ){
test.done();
});
},
}
function as( callback ){
process.nextTick( function() {
a = testMe();
callback( null, a );
});
}
function testMe(){
a.b.c.d.e = 100;
return 10;
}
However, testMe() might be a new function I am developing. An uninitialised variable, or anything, will just fall silent.