Skip to content

Commit

Permalink
test: refactor test-beforeexit-event-exit using mustNotCall
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
himself65 authored and targos committed Aug 2, 2019
1 parent c42eb5d commit efe9b97
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/parallel/test-beforeexit-event-exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

0 comments on commit efe9b97

Please sign in to comment.