Skip to content

Commit 5352cde

Browse files
Trottaddaleax
authored andcommitted
test: allow ENOENT in test-worker-init-failure
PR-URL: #34769 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ricky Zhou <[email protected]>
1 parent 238d01f commit 5352cde

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-worker-init-failure.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ if (process.argv[2] === 'child') {
3030
});
3131

3232
// We want to test that if there is an error in a constrained running
33-
// environment, it will be one of `ENFILE`, `EMFILE`, or
33+
// environment, it will be one of `ENFILE`, `EMFILE`, 'ENOENT', or
3434
// `ERR_WORKER_INIT_FAILED`.
35-
const allowableCodes = ['ERR_WORKER_INIT_FAILED', 'EMFILE', 'ENFILE'];
35+
const expected = ['ERR_WORKER_INIT_FAILED', 'EMFILE', 'ENFILE', 'ENOENT'];
3636

3737
// `common.mustCall*` cannot be used here as in some environments
3838
// (i.e. single cpu) `ulimit` may not lead to such an error.
3939
worker.on('error', (e) => {
40-
assert.ok(allowableCodes.includes(e.code), `${e.code} not expected`);
40+
assert.ok(expected.includes(e.code), `${e.code} not expected`);
4141
});
4242
}
4343

0 commit comments

Comments
 (0)