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:
himself65 authored and Michaël Zasso committed 2019-08-02 22:24:08 +02:00
1 parent c42eb5dd55
commit efe9b97d40
1 file changed
+2 -5
+2 -5
View File
@@ -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();