-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in "done() called multiple times" assumptions #1417
Comments
I'll look into this since it's probably my code. |
👍 |
+1 got the same error in a very similar case. tested this particular case and it happened just as described, I can confirm the behaviour. |
I am seeing the same behavior. Has this been researched yet? This is almost a year old now. |
…lled multiple times error
I'm also experiencing the same problem. Lost about an hour of work figuring out this was a bug in mocha and not the usage of mocha. |
…nkleonrose/mocha into pull/2059 * 'fix-1417-multiple-done-calls' of https://github.com/frankleonrose/mocha: Fix #1417: Show actual error, not 'multiple calls to done()' # Conflicts: # test/integration/regression.js
…nkleonrose/mocha into pull/2059 * 'fix-1417-multiple-done-calls' of https://github.com/frankleonrose/mocha: Fix mochajs#1417: Show actual error, not 'multiple calls to done()' # Conflicts: # test/integration/regression.js
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:
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.
The text was updated successfully, but these errors were encountered: