The easiest way to throw in Mocha

It turns out done accepts err as arguments, so it is straightforward to throw an error by


done( new Error("Unexpected error") );

Advertisements
Standard