throw null
if null is thrown, it's it ends the test, but does not count as an error!
you get a passing test!
in javascript you can throw ANYTHING
We absolutely don't check instanceof Error anywhere, nor do we say if(err) in the errorHandling code. So something else is going on.
it's mainly in the reporting end of things: lib/console-runner 236 var r = tests[i]; if (r.failure) { var s = r.failure.stack ? r.failure.stack.split("\n"): ['no stack trace']
also, lib/testing 206
if (test.failure) {
test.failureType = test.failure instanceof assert.AssertionError ? 'assertion' : 'error';
a lot of that code breaks if a non Error is thrown, usually a property of null error when you try to say failure.stack.length, and failure is a string, and has no stack property.