Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit efe9b97

Browse filesBrowse files
himself65targos
authored andcommitted
test: refactor test-beforeexit-event-exit using mustNotCall
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>
1 parent c42eb5d commit efe9b97
Copy full SHA for efe9b97

File tree

Expand file treeCollapse file tree

1 file changed

+2
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-5
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-beforeexit-event-exit.js
+2-5Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.