mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Support an `env` option that is passed to the underlying child_process. Fixes: https://github.com/nodejs/node/issues/60709 PR-URL: https://github.com/nodejs/node/pull/61367 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
8 lines
392 B
JavaScript
8 lines
392 B
JavaScript
const { test } = require('node:test');
|
|
|
|
test('process.env is correct', (t) => {
|
|
t.assert.strictEqual(process.env.ABC, undefined, 'main process env var should be undefined');
|
|
t.assert.strictEqual(process.env.NODE_TEST_CONTEXT, 'child-v8', 'NODE_TEST_CONTEXT should be set by run()');
|
|
t.assert.strictEqual(process.env.FOOBAR, 'FUZZBUZZ', 'specified env var should be defined');
|
|
});
|