From ff0f0c8e60ac7335181a1db536d68c2dea51c492 Mon Sep 17 00:00:00 2001 From: BethGriggs Date: Tue, 3 Jan 2017 14:31:18 +0000 Subject: [PATCH] fixup! test: refactor several parallel/test-timer tests --- test/parallel/test-timers-uncaught-exception.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-timers-uncaught-exception.js b/test/parallel/test-timers-uncaught-exception.js index 49ce0bf4184a6c..31a2d7eccd8105 100644 --- a/test/parallel/test-timers-uncaught-exception.js +++ b/test/parallel/test-timers-uncaught-exception.js @@ -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); -});