test: refactor test-beforeexit-event-exit using mustNotCall
PR-URL: https://github.com/nodejs/node/pull/28901 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
b32526c488
commit
980df1c85f
@ -20,11 +20,8 @@
|
||||
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
'use strict';
|
||||
require('../common');
|
||||
const assert = require('assert');
|
||||
const { mustNotCall } = require('../common');
|
||||
|
||||
process.on('beforeExit', function() {
|
||||
assert.fail('exit should not allow this to occur');
|
||||
});
|
||||
process.on('beforeExit', mustNotCall('exit should not allow this to occur'));
|
||||
|
||||
process.exit();
|
||||
|
Loading…
x
Reference in New Issue
Block a user