summaryrefslogtreecommitdiff
path: root/test/parallel/test-whatwg-url-custom-properties.js
diff options
context:
space:
mode:
authorGrigoriy Levanov <glevanov@gmail.com>2019-11-06 15:31:36 +0300
committerKamat, Trivikram <16024985+trivikr@users.noreply.github.com>2019-11-12 17:19:22 -0800
commit35ec01097b2a397ad0a22aac536fe07514876e21 (patch)
tree05424c9d13243458c7f466fbbb876b401b019288 /test/parallel/test-whatwg-url-custom-properties.js
parent1e0679e56d8e340821fc803073df215c1145dc5b (diff)
downloadandroid-node-v8-35ec01097b2a397ad0a22aac536fe07514876e21.tar.gz
android-node-v8-35ec01097b2a397ad0a22aac536fe07514876e21.tar.bz2
android-node-v8-35ec01097b2a397ad0a22aac536fe07514876e21.zip
test: replace Object.assign with object spread
Replaces Object.assign with spread where object is simply cloned PR-URL: https://github.com/nodejs/node/pull/30306 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-whatwg-url-custom-properties.js')
-rw-r--r--test/parallel/test-whatwg-url-custom-properties.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-whatwg-url-custom-properties.js b/test/parallel/test-whatwg-url-custom-properties.js
index 1fbc3ab623..23742a8e74 100644
--- a/test/parallel/test-whatwg-url-custom-properties.js
+++ b/test/parallel/test-whatwg-url-custom-properties.js
@@ -152,7 +152,7 @@ assert.strictEqual(url.searchParams, oldParams);
// contains the Symbols that Node uses for brand checking, but not the data
// properties, which are getters. Verify that urlToOptions() can handle such
// a case.
- const copiedUrlObj = Object.assign({}, urlObj);
+ const copiedUrlObj = { ...urlObj };
const copiedOpts = urlToOptions(copiedUrlObj);
assert.strictEqual(copiedOpts instanceof URL, false);
assert.strictEqual(copiedOpts.protocol, undefined);