Skip to content
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

Duplicate test.done() breaks nodeunit internals #234

Open
TWiStErRob opened this issue Dec 3, 2013 · 2 comments
Open

Duplicate test.done() breaks nodeunit internals #234

TWiStErRob opened this issue Dec 3, 2013 · 2 comments

Comments

@TWiStErRob
Copy link

test.js (there's no smaller repro than this!):

exports.duplicateDoneBreaksNodeUnit = function(test) {
    test.done();
    test.done();
};

output:

�[1m�[32mOK: �[39m�[22m0 assertions (105ms)

...\project\node_modules\nodeunit\lib\core.js:284
    if (group.setUp) {
             ^
TypeError: Cannot read property 'setUp' of undefined
    at wrapGroup (...\project\node_modules\nodeunit\lib\core.js:284:14)
    at Object.exports.runSuite (...\project\node_modules\nodeunit\lib\core.js:92:13)
    at exports.runSuite (...\project\node_modules\nodeunit\lib\core.js:124:21)
    at _concat (...\project\node_modules\nodeunit\deps\async.js:513:13)
    at async.forEachSeries.iterate (...\project\node_modules\nodeunit\deps\async.js:123:13)
    at async.forEachSeries.iterate (...\project\node_modules\nodeunit\deps\async.js:134:25)
    at _concat (...\project\node_modules\nodeunit\deps\async.js:515:17)
    at exports.test.test.done (...\project\node_modules\nodeunit\lib\types.js:146:17)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)
@luanmuniz
Copy link

👍 Same here

@jkingsbery
Copy link

Agreed. It would be nice if nodeunit provided an error message saying that test.done was invoked multiple times or something like that. I started looking around for a setUp function and couldn't find any, it's a very misleading error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants