diff options
author | himself65 <himself65@outlook.com> | 2019-07-31 01:36:19 +0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-08-01 13:13:47 -0700 |
commit | 980df1c85ff5167f5e313d19fb686b46db0b31db (patch) | |
tree | 5e9dd964991380fc9bc0d786db94f451afb3fba5 | |
parent | b32526c488dc1c059e957b0e2c38cb41cfe2bb78 (diff) | |
download | android-node-v8-980df1c85ff5167f5e313d19fb686b46db0b31db.tar.gz android-node-v8-980df1c85ff5167f5e313d19fb686b46db0b31db.tar.bz2 android-node-v8-980df1c85ff5167f5e313d19fb686b46db0b31db.zip |
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>
-rw-r--r-- | test/parallel/test-beforeexit-event-exit.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/test/parallel/test-beforeexit-event-exit.js b/test/parallel/test-beforeexit-event-exit.js index 8c07da9ca9..4210ad04b6 100644 --- a/test/parallel/test-beforeexit-event-exit.js +++ b/test/parallel/test-beforeexit-event-exit.js @@ -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(); |