From 01da702fec0f39c393b29042c8220c371aad5bf8 Mon Sep 17 00:00:00 2001 From: poutch Date: Tue, 12 Nov 2019 15:49:04 +0000 Subject: [PATCH] test: change object assign to spread object change object assign to spread object in test-npm-install.js PR-URL: https://github.com/nodejs/node/pull/30422 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat --- test/parallel/test-npm-install.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-npm-install.js b/test/parallel/test-npm-install.js index 069465466df682..1eec5f57ad6db9 100644 --- a/test/parallel/test-npm-install.js +++ b/test/parallel/test-npm-install.js @@ -38,12 +38,12 @@ const pkgPath = path.join(installDir, 'package.json'); fs.writeFileSync(pkgPath, pkgContent); -const env = Object.assign({}, process.env, { - PATH: path.dirname(process.execPath), - NPM_CONFIG_PREFIX: path.join(npmSandbox, 'npm-prefix'), - NPM_CONFIG_TMP: path.join(npmSandbox, 'npm-tmp'), - HOME: homeDir, -}); +const env = { ...process.env, + PATH: path.dirname(process.execPath), + NPM_CONFIG_PREFIX: path.join(npmSandbox, 'npm-prefix'), + NPM_CONFIG_TMP: path.join(npmSandbox, 'npm-tmp'), + HOME: homeDir, +}; exec(`${process.execPath} ${npmPath} install`, { cwd: installDir,