-
-
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
specify type of runnable in multiple done error #1890
Comments
Looks like a duplicate of #1798 since #1889 fixes exactly that? $ cat test/integration/fixtures/multiple.done.beforeEach.js
describe('suite', function() {
beforeEach(function(done) {
setTimeout(done, 10);
setTimeout(done, 20);
});
it('test1', function(done) {
setTimeout(done, 50);
});
it('test2', function(done) {
setTimeout(done, 50);
});
});
danielstjules:~/git/mocha (issue-1798)
$ ./bin/mocha test/integration/fixtures/multiple.done.beforeEach.js
․․․․
2 passing (133ms)
2 failing
1) suite "before each" hook:
Error: done() called multiple times
at Hook.Runnable (lib/runnable.js:54:17)
at new Hook (lib/hook.js:22:12)
at Suite.beforeEach (lib/suite.js:237:14)
at beforeEach (lib/interfaces/common.js:52:17)
at Suite.<anonymous> (test/integration/fixtures/multiple.done.beforeEach.js:2:3)
at context.describe.context.context (lib/interfaces/bdd.js:47:10)
at Object.<anonymous> (test/integration/fixtures/multiple.done.beforeEach.js:1:63)
at Array.forEach (native)
at Object.<anonymous> (bin/_mocha:393:18)
at node.js:951:3
2) suite "before each" hook:
Error: done() called multiple times
at Hook.Runnable (lib/runnable.js:54:17)
at new Hook (lib/hook.js:22:12)
at Suite.beforeEach (lib/suite.js:237:14)
at beforeEach (lib/interfaces/common.js:52:17)
at Suite.<anonymous> (test/integration/fixtures/multiple.done.beforeEach.js:2:3)
at context.describe.context.context (lib/interfaces/bdd.js:47:10)
at Object.<anonymous> (test/integration/fixtures/multiple.done.beforeEach.js:1:63)
at Array.forEach (native)
at Object.<anonymous> (bin/_mocha:393:18)
at node.js:951:3 I think you were using |
Note that it doesn't say |
Bingo. I was furthermore confused due to test helpers actually using the dev source code. |
before:
after:
The text was updated successfully, but these errors were encountered: