0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-next-tick-when-exiting.js
Rich Trott 06c29a66d4 test: remove common.fail()
common.fail() was added to paste over issues with assert.fail() function
signature. assert.fail() has been updated to accept a single argument so
common.fail() is no longer necessary.

PR-URL: https://github.com/nodejs/node/pull/12293
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-12 14:25:33 -07:00

15 lines
295 B
JavaScript

'use strict';
require('../common');
const assert = require('assert');
process.on('exit', () => {
assert.strictEqual(process._exiting, true, 'process._exiting was not set!');
process.nextTick(() => {
assert.fail('process is exiting, should not be called.');
});
});
process.exit();