From 1c324d593926fcb78cea6dfe59e929352b743c38 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 14 Aug 2020 15:40:19 -0700 Subject: [PATCH] test: allow ENOENT in test-worker-init-failure PR-URL: https://github.com/nodejs/node/pull/34769 Reviewed-By: Gireesh Punathil Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Denys Otrishko Reviewed-By: Ben Noordhuis Reviewed-By: Ricky Zhou <0x19951125@gmail.com> --- test/parallel/test-worker-init-failure.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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`); }); }