node/test/parallel/test-worker-node-options.js
Antoine du Hamel 6e474c024c
test: skip tests not passing without NODE_OPTIONS support
PR-URL: https://github.com/nodejs/node/pull/60912
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2025-12-07 20:28:57 +00:00

41 lines
715 B
JavaScript

'use strict';
const common = require('../common');
const {
spawnSyncAndExitWithoutError,
spawnSyncAndAssert,
} = require('../common/child_process');
if (process.config.variables.node_without_node_options) {
common.skip('missing NODE_OPTIONS support');
}
const fixtures = require('../common/fixtures');
spawnSyncAndExitWithoutError(
process.execPath,
[
fixtures.path('spawn-worker-with-copied-env'),
],
{
env: {
...process.env,
NODE_OPTIONS: '--title=foo'
}
}
);
spawnSyncAndAssert(
process.execPath,
[
fixtures.path('spawn-worker-with-trace-exit'),
],
{
env: {
...process.env,
}
},
{
stderr: /spawn-worker-with-trace-exit\.js:17/
}
);