nodejs/test/parallel/test-process-exit-from-before-exit.js

9 lines
247 B
JavaScript
Raw Normal View History

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