Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9dab32f

Browse filesBrowse files
19shubham11addaleax
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 7e7a816 commit 9dab32f
Copy full SHA for 9dab32f

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-fork-args.js
+1-1Lines 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
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(
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-fork-exec-path.js
+1-1Lines 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-
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.