summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhimself65 <himself65@outlook.com>2019-07-31 01:36:19 +0800
committerRich Trott <rtrott@gmail.com>2019-08-01 13:13:47 -0700
commit980df1c85ff5167f5e313d19fb686b46db0b31db (patch)
tree5e9dd964991380fc9bc0d786db94f451afb3fba5
parentb32526c488dc1c059e957b0e2c38cb41cfe2bb78 (diff)
downloadandroid-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.js7
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();