Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! test: refactor several parallel/test-timer tests
  • Loading branch information
BethGriggs committed Jan 3, 2017
commit ff0f0c8e60ac7335181a1db536d68c2dea51c492
8 changes: 2 additions & 6 deletions test/parallel/test-timers-uncaught-exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ const errorMsg = 'BAM!';
// the first timer throws...
setTimeout(common.mustCall(function() {
throw new Error(errorMsg);
}), 100);
}), 1);

// ...but the second one should still run
setTimeout(common.mustCall(function() {}), 100);
setTimeout(common.mustCall(function() {}), 1);

function uncaughtException(err) {
assert.strictEqual(err.message, errorMsg);
}

process.on('uncaughtException', common.mustCall(uncaughtException));

process.on('exit', function() {
process.removeListener('uncaughtException', uncaughtException);
});