Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
benchmark: refactor deepequal-object
This is a minor refactor of benchmark/assert/deepequal-object.js to
reduce exceptions that need to be made for lint compliance.
  • Loading branch information
Trott committed May 30, 2018
commit e76f5c10b9594c3136c3dbd1b94e07c55c0552b6
6 changes: 4 additions & 2 deletions benchmark/assert/deepequal-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ function main({ size, n, method }) {
// TODO: Fix this "hack". `n` should not be manipulated.
n = n / size;

if (!method)
method = 'deepEqual';

const source = Array.apply(null, Array(size));
const actual = createObj(source);
const expected = createObj(source);
const expectedWrong = createObj(source, '4');

// 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();
Expand Down