Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jmar777
Created December 6, 2011 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmar777/1438814 to your computer and use it in GitHub Desktop.
Save jmar777/1438814 to your computer and use it in GitHub Desktop.
mocha silent error in `before`
describe('silent error', function() {
/*
// ReferenceError bubbles up just fine
before(function() {
assert('foo');
});
*/
/*
// ReferenceError bubbles up just fine
before(function(done) {
assert('foo');
done();
});
*/
// ReferenceError dies silently, test never completes
before(function(done) {
setTimeout(function() {
assert('foo');
}, 10);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment