summaryrefslogtreecommitdiff
path: root/test/parallel/test-process-exit-from-before-exit.js
blob: b37df0a5bd340d28f3ec6d38c986a6c82dc8bbb1 (plain)
1
2
3
4
5
6
7
8
'use strict';
var common = require('../common');

process.on('beforeExit', common.mustCall(function() {
  setTimeout(common.fail, 5);
  process.exit(0);  // Should execute immediately even if we schedule new work.
  common.fail();
}));