diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2017-12-30 03:54:30 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-01-23 01:29:15 +0100 |
commit | 366fd03af00407e9b45d91d9df66b3ab34b10f35 (patch) | |
tree | cde109f3a384d1055bc71322d6fc2f1347d759f5 /benchmark/assert/deepequal-object.js | |
parent | 0beef3f03032a97bb0bda1539add7506a11cf2a8 (diff) | |
download | android-node-v8-366fd03af00407e9b45d91d9df66b3ab34b10f35.tar.gz android-node-v8-366fd03af00407e9b45d91d9df66b3ab34b10f35.tar.bz2 android-node-v8-366fd03af00407e9b45d91d9df66b3ab34b10f35.zip |
benchmark: (assert) use destructuring
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/assert/deepequal-object.js')
-rw-r--r-- | benchmark/assert/deepequal-object.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/benchmark/assert/deepequal-object.js b/benchmark/assert/deepequal-object.js index 4ad3704408..2c2549d584 100644 --- a/benchmark/assert/deepequal-object.js +++ b/benchmark/assert/deepequal-object.js @@ -25,10 +25,9 @@ function createObj(source, add = '') { })); } -function main(conf) { - const size = conf.size; - // TODO: Fix this "hack" - const n = conf.n / size; +function main({ size, n, method }) { + // TODO: Fix this "hack". `n` should not be manipulated. + n = n / size; var i; const source = Array.apply(null, Array(size)); @@ -36,7 +35,7 @@ function main(conf) { const expected = createObj(source); const expectedWrong = createObj(source, '4'); - switch (conf.method) { + switch (method) { case '': // Empty string falls through to next line as default, mostly for tests. case 'deepEqual': |