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 e3d9d25

Browse filesBrowse files
committed
test: add test-child-process-emfile fail message
When the test fails (as it does frequently on FreeBSD unfortunately) provide a non-cryptic error message that also provides a line number. PR-URL: #3335 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 2d35607 commit e3d9d25
Copy full SHA for e3d9d25

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/sequential/test-child-process-emfile.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-child-process-emfile.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ proc.on('error', common.mustCall(function(err) {
2727
assert(err.code === 'EMFILE' || err.code === 'ENFILE');
2828
}));
2929

30-
// 'exit' should not be emitted, the process was never spawned.
31-
proc.on('exit', assert.fail);
30+
proc.on('exit', function() {
31+
const msg = '"exit" should not be emitted (the process never spawned!)';
32+
assert.fail(null, null, msg);
33+
});
3234

3335
// close one fd for LSan
3436
if (openFds.length >= 1) {

0 commit comments

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