From 3eee6d42b90aa17a51a2c436b55ab2c8bc1c6cfe Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 8 Dec 2016 22:26:28 -0800 Subject: [PATCH] test: refactor test-handle-wrap-close-abort * use common.mustCall() to confirm number of uncaught exceptions * var -> const * specify duration of 1ms for setTimeout() and setInterval() PR-URL: https://github.com/nodejs/node/pull/10188 Reviewed-By: Santiago Gimeno Reviewed-By: Colin Ihrig Reviewed-By: Sakthipriyan Vairamani --- test/parallel/test-handle-wrap-close-abort.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-handle-wrap-close-abort.js b/test/parallel/test-handle-wrap-close-abort.js index 8572668f666864..5355e65df60821 100644 --- a/test/parallel/test-handle-wrap-close-abort.js +++ b/test/parallel/test-handle-wrap-close-abort.js @@ -1,16 +1,16 @@ 'use strict'; -require('../common'); +const common = require('../common'); -process.on('uncaughtException', function() { }); +process.on('uncaughtException', common.mustCall(function() {}, 2)); setTimeout(function() { process.nextTick(function() { - var c = setInterval(function() { + const c = setInterval(function() { clearInterval(c); throw new Error('setInterval'); - }); + }, 1); }); setTimeout(function() { throw new Error('setTimeout'); - }); + }, 1); });