From 83e297b0947d8749c67a6d0f99872b8a1318ab0c Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 21 Jun 2024 18:18:50 +0000 Subject: [PATCH] test: extend env for `test-node-output-errors` Extend, rather than replace, `env` for `test-node-output-errors` so that `node` binaries that need `LD_LIBRARY_PATH`, `LIBPATH` or `DYLD_LIBRARY_PATH` can run. --- test/parallel/test-node-output-errors.mjs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/parallel/test-node-output-errors.mjs b/test/parallel/test-node-output-errors.mjs index 6c5fb398555c1b..8b321ed158b66c 100644 --- a/test/parallel/test-node-output-errors.mjs +++ b/test/parallel/test-node-output-errors.mjs @@ -6,8 +6,6 @@ import { describe, it } from 'node:test'; import { pathToFileURL } from 'node:url'; const skipForceColors = - process.config.variables.icu_gyp_path !== 'tools/icu/icu-generic.gyp' || - process.config.variables.node_shared_openssl || (common.isWindows && (Number(os.release().split('.')[0]) !== 10 || Number(os.release().split('.')[2]) < 14393)); // See https://github.com/nodejs/node/pull/33132 @@ -76,7 +74,7 @@ describe('errors output', { concurrency: !process.env.TEST_PARALLEL }, () => { ]; for (const { name, transform = defaultTransform, env, skip = false } of tests) { it(name, { skip }, async () => { - await snapshot.spawnAndAssert(fixtures.path(name), transform, { env }); + await snapshot.spawnAndAssert(fixtures.path(name), transform, { env: { ...env, ...process.env } }); }); } });