Skip to content

Commit 3eee6d4

Browse files
TrottMylesBorins
authored andcommitted
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: #10188 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1 parent 0cc8d69 commit 3eee6d4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
'use strict';
2-
require('../common');
2+
const common = require('../common');
33

4-
process.on('uncaughtException', function() { });
4+
process.on('uncaughtException', common.mustCall(function() {}, 2));
55

66
setTimeout(function() {
77
process.nextTick(function() {
8-
var c = setInterval(function() {
8+
const c = setInterval(function() {
99
clearInterval(c);
1010
throw new Error('setInterval');
11-
});
11+
}, 1);
1212
});
1313
setTimeout(function() {
1414
throw new Error('setTimeout');
15-
});
15+
}, 1);
1616
});

0 commit comments

Comments
 (0)