mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
c83af17ff9
Similar to SmartOS IBM i does not return the process.title PR-URL: https://github.com/nodejs/node/pull/53952 Fixes: https://github.com/nodejs/node/issues/53852 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
18 lines
546 B
JavaScript
18 lines
546 B
JavaScript
'use strict';
|
|
|
|
// This test is meant to be spawned with NODE_OPTIONS=--title=foo
|
|
const assert = require('assert');
|
|
if (process.platform !== 'sunos' && process.platform !== 'os400') { // --title is unsupported on SmartOS and IBM i.
|
|
assert.strictEqual(process.title, 'foo');
|
|
}
|
|
|
|
// Spawns a worker that may copy NODE_OPTIONS if it's set by the parent.
|
|
const { Worker } = require('worker_threads');
|
|
new Worker(`require('assert').strictEqual(process.env.TEST_VAR, 'bar')`, {
|
|
env: {
|
|
...process.env,
|
|
TEST_VAR: 'bar',
|
|
},
|
|
eval: true,
|
|
});
|