Skip to content

Commit

Permalink
test: refactor test-handle-wrap-close-abort
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Trott authored and MylesBorins committed Jan 24, 2017
1 parent 0cc8d69 commit 3eee6d4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-handle-wrap-close-abort.js
Original file line number Diff line number Diff line change
@@ -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);
});

0 comments on commit 3eee6d4

Please sign in to comment.