diff options
author | Shubham Chaturvedi <19shubham11@gmail.com> | 2019-11-12 15:34:47 +0000 |
---|---|---|
committer | Gireesh Punathil <gpunathi@in.ibm.com> | 2019-11-24 20:36:54 +0530 |
commit | d3b658865cb85efb138ec8bd639f4af5665bf1cf (patch) | |
tree | 56ec7caa9f28c71ef0c2c0e1a46499b1a2fffdb7 /test/parallel | |
parent | d2a7d20f5ba14f3c7894cae9a9eaeef1b4db4801 (diff) | |
download | android-node-v8-d3b658865cb85efb138ec8bd639f4af5665bf1cf.tar.gz android-node-v8-d3b658865cb85efb138ec8bd639f4af5665bf1cf.tar.bz2 android-node-v8-d3b658865cb85efb138ec8bd639f4af5665bf1cf.zip |
test: use spread instead of object.assign
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test/parallel')
-rw-r--r-- | test/parallel/test-child-process-fork-args.js | 2 | ||||
-rw-r--r-- | test/parallel/test-child-process-fork-exec-path.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-child-process-fork-args.js b/test/parallel/test-child-process-fork-args.js index 7c86616f37..f2f5689d64 100644 --- a/test/parallel/test-child-process-fork-args.js +++ b/test/parallel/test-child-process-fork-args.js @@ -64,7 +64,7 @@ const expectedEnv = { foo: 'bar' }; argsLists.forEach((args) => { const cp = fork(fixtures.path('child-process-echo-options.js'), args, { - env: Object.assign({}, process.env, expectedEnv) + env: { ...process.env, ...expectedEnv } }); cp.on( diff --git a/test/parallel/test-child-process-fork-exec-path.js b/test/parallel/test-child-process-fork-exec-path.js index 6a99c5a8f5..38adfd72de 100644 --- a/test/parallel/test-child-process-fork-exec-path.js +++ b/test/parallel/test-child-process-fork-exec-path.js @@ -51,7 +51,7 @@ assert.strictEqual(fs.existsSync(copyPath), false); fs.copyFileSync(nodePath, copyPath, fs.constants.COPYFILE_FICLONE); fs.chmodSync(copyPath, '0755'); -const envCopy = Object.assign({}, process.env, { 'FORK': 'true' }); +const envCopy = { ...process.env, FORK: 'true' }; const child = fork(__filename, { execPath: copyPath, env: envCopy }); child.on('message', common.mustCall(function(recv) { assert.deepStrictEqual(recv, msg); |