mirror of https://github.com/lukechilds/node.git
Browse Source
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>v6.x-staging
Rich Trott
8 years ago
committed by
Myles Borins
45 changed files with 95 additions and 89 deletions
@ -1,8 +1,9 @@ |
|||
'use strict'; |
|||
const common = require('../common'); |
|||
require('../common'); |
|||
const assert = require('assert'); |
|||
|
|||
process.on('beforeExit', function() { |
|||
common.fail('exit should not allow this to occur'); |
|||
assert.fail('exit should not allow this to occur'); |
|||
}); |
|||
|
|||
process.exit(); |
|||
|
@ -1,8 +1,9 @@ |
|||
'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.
|
|||
common.fail(); |
|||
assert.fail(); |
|||
})); |
|||
|
Loading…
Reference in new issue