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 <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent b22a946 commit 6c7e491

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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

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

6565
argsLists.forEach((args)=>{
6666
constcp=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‎

Lines changed: 1 addition & 1 deletion
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-
constenvCopy=Object.assign({},process.env,{'FORK': 'true'});
54+
constenvCopy={ ...process.env,FORK: 'true'};
5555
constchild=fork(__filename,{execPath: copyPath,env: envCopy});
5656
child.on('message',common.mustCall(function(recv){
5757
assert.deepStrictEqual(recv,msg);

0 commit comments

Comments
 (0)