Closed
Description
openedon Nov 5, 2014
This code here will hide the true error of certain failed async tests:
https://github.com/mochajs/mocha/blob/master/lib/runnable.js#L216-L230
To reproduce, try this:
it('should work', function (done) {
setImmediate(done)
throw new Error('hidden')
})
You will never see the error with the "hidden" message. It will just tell you done was called twice, which is terribly misleading, as the user code only called it once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels