Skip to content

Commit 9384769

Browse files
Trottjasnell
authored andcommitted
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 <[email protected]>
1 parent 4be4328 commit 9384769

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

+4-2
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)