Skip to content

Commit 6c7e491

Browse files
19shubham11targos
authored andcommitted
test: use spread instead of object.assign
PR-URL: #30412 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent b22a946 commit 6c7e491

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/parallel/test-child-process-fork-args.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const expectedEnv = { foo: 'bar' };
6464

6565
argsLists.forEach((args) => {
6666
const cp = fork(fixtures.path('child-process-echo-options.js'), args, {
67-
env: Object.assign({}, process.env, expectedEnv)
67+
env: { ...process.env, ...expectedEnv }
6868
});
6969

7070
cp.on(

test/parallel/test-child-process-fork-exec-path.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ assert.strictEqual(fs.existsSync(copyPath), false);
5151
fs.copyFileSync(nodePath, copyPath, fs.constants.COPYFILE_FICLONE);
5252
fs.chmodSync(copyPath, '0755');
5353

54-
const envCopy = Object.assign({}, process.env, { 'FORK': 'true' });
54+
const envCopy = { ...process.env, FORK: 'true' };
5555
const child = fork(__filename, { execPath: copyPath, env: envCopy });
5656
child.on('message', common.mustCall(function(recv) {
5757
assert.deepStrictEqual(recv, msg);

0 commit comments

Comments
 (0)