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 ea81d42

Browse filesBrowse files
thatshaileshaddaleax
authored andcommitted
test: show actual error in next-tick-when-exiting
On process exit if some assertion error occurs value of `process._exiting` was hidden, this fix will show the actual error message with value. PR-URL: #20956 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 46d1025 commit ea81d42
Copy full SHA for ea81d42

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+5
-5
lines changed
Open diff view settings
Collapse file
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
'use strict';
22

3-
require('../common');
3+
const common = require('../common');
44
const assert = require('assert');
55

66
process.on('exit', () => {
7-
assert.strictEqual(process._exiting, true, 'process._exiting was not set!');
7+
assert.strictEqual(process._exiting, true);
88

9-
process.nextTick(() => {
10-
assert.fail('process is exiting, should not be called.');
11-
});
9+
process.nextTick(
10+
common.mustNotCall('process is exiting, should not be called')
11+
);
1212
});
1313

1414
process.exit();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.