Created
December 6, 2011 16:25
-
-
Save jmar777/1438814 to your computer and use it in GitHub Desktop.
mocha silent error in `before`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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