summaryrefslogtreecommitdiff
path: root/test/parallel/test-process-next-tick.js
blob: 343511445280d42ea456af11fb60225fc70fd5da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict';
const common = require('../common');
var N = 2;

function cb() {
  throw new Error();
}

for (var i = 0; i < N; ++i) {
  process.nextTick(common.mustCall(cb));
}

process.on('uncaughtException', common.mustCall(function() {}, N));

process.on('exit', function() {
  process.removeAllListeners('uncaughtException');
});