Skip to content

Commit

Permalink
fixup! test: refactor several parallel/test-timer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BethGriggs committed Jan 3, 2017
1 parent 7d2a771 commit ff0f0c8
Showing 1 changed file with 2 additions and 6 deletions.
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);
});

0 comments on commit ff0f0c8

Please sign in to comment.