mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
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. Backport-PR-URL: https://github.com/nodejs/node/pull/15479 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>
10 lines
281 B
JavaScript
10 lines
281 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
process.on('beforeExit', common.mustCall(function() {
|
|
setTimeout(common.mustNotCall(), 5);
|
|
process.exit(0); // Should execute immediately even if we schedule new work.
|
|
assert.fail();
|
|
}));
|