From b8f8ca570243bb58337e547f7bf10515cfab0ea5 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 30 May 2018 03:53:11 +0000 Subject: benchmark: refactor deepequal-typedarrays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a minor refactor of benchmark/assert/deepequal-typedarrays.js to reduce exceptions that need to be made for lint compliance. PR-URL: https://github.com/nodejs/node/pull/21030 Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat --- benchmark/assert/deepequal-typedarrays.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'benchmark/assert') diff --git a/benchmark/assert/deepequal-typedarrays.js b/benchmark/assert/deepequal-typedarrays.js index 50e6e525b2..c4d8f434bf 100644 --- a/benchmark/assert/deepequal-typedarrays.js +++ b/benchmark/assert/deepequal-typedarrays.js @@ -25,6 +25,8 @@ const bench = common.createBenchmark(main, { }); function main({ type, n, len, method }) { + if (!method) + method = 'deepEqual'; const clazz = global[type]; const actual = new clazz(len); const expected = new clazz(len); @@ -32,8 +34,7 @@ function main({ type, n, len, method }) { const wrongIndex = Math.floor(len / 2); expectedWrong[wrongIndex] = 123; - // eslint-disable-next-line no-restricted-properties - const fn = method !== '' ? assert[method] : assert.deepEqual; + const fn = assert[method]; const value2 = method.includes('not') ? expectedWrong : expected; bench.start(); -- cgit v1.2.3