mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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 <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
1 parent
c65dfa9b12
commit
b2b2774325
1 file changed
+5
-5
@@ -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);
|
||||
});
|
||||
Reference in new issue
Block a user