diff --git a/test/parallel/test-worker-init-failure.js b/test/parallel/test-worker-init-failure.js index e87238237aad4e..a15d8a75617a16 100644 --- a/test/parallel/test-worker-init-failure.js +++ b/test/parallel/test-worker-init-failure.js @@ -30,14 +30,14 @@ if (process.argv[2] === 'child') { }); // We want to test that if there is an error in a constrained running - // environment, it will be one of `ENFILE`, `EMFILE`, or + // environment, it will be one of `ENFILE`, `EMFILE`, 'ENOENT', or // `ERR_WORKER_INIT_FAILED`. - const allowableCodes = ['ERR_WORKER_INIT_FAILED', 'EMFILE', 'ENFILE']; + const expected = ['ERR_WORKER_INIT_FAILED', 'EMFILE', 'ENFILE', 'ENOENT']; // `common.mustCall*` cannot be used here as in some environments // (i.e. single cpu) `ulimit` may not lead to such an error. worker.on('error', (e) => { - assert.ok(allowableCodes.includes(e.code), `${e.code} not expected`); + assert.ok(expected.includes(e.code), `${e.code} not expected`); }); }