Skip to content

Commit efe9b97

Browse files
himself65targos
authored andcommitted
test: refactor test-beforeexit-event-exit using mustNotCall
PR-URL: #28901 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c42eb5d commit efe9b97

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/parallel/test-beforeexit-event-exit.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23-
require('../common');
24-
const assert = require('assert');
23+
const { mustNotCall } = require('../common');
2524

26-
process.on('beforeExit', function() {
27-
assert.fail('exit should not allow this to occur');
28-
});
25+
process.on('beforeExit', mustNotCall('exit should not allow this to occur'));
2926

3027
process.exit();

0 commit comments

Comments
 (0)