Skip to content

Commit

Permalink
lint: lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xtx1130 committed Jun 19, 2024
1 parent 622815d commit cd555f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion benchmark/_cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const fs = require('fs');
const path = require('path');

const kEmptyObject = Object.freeze({__proto__: null});
const kEmptyObject = Object.freeze({ __proto__: null });
// Create an object of all benchmark scripts
const benchmarks = {};
fs.readdirSync(__dirname)
Expand Down
14 changes: 7 additions & 7 deletions test/parallel/test-benchmark-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const originalArgv = process.argv;

function testFilterPattern(filters, excludes, filename, expectedResult) {
process.argv = process.argv.concat(
filters.flatMap((p) => ['--filter', p]),
excludes.flatMap((p) => ['--exclude', p]),
['bench'],
filters.flatMap((p) => ['--filter', p]),
excludes.flatMap((p) => ['--exclude', p]),
['bench'],
);

const cli = new CLI('', { 'arrayArgs': ['filter', 'exclude'] });
Expand Down Expand Up @@ -74,10 +74,10 @@ function testNormalOption(options = [], expectedResult = []) {
process.argv = process.argv.concat(options);
const cli = new CLI('', { boolArgs: ['foo', 'bar', 'foo-bar'] });
const optional = Object.keys(cli.optional);
assert.deepEqual(optional, expectedResult);
assert.deepStrictEqual(optional, expectedResult);
process.argv = originalArgv;
}

testNormalOption(['--foo'], ['foo'])
testNormalOption(['--foo', '--bar'], ['foo', 'bar'])
testNormalOption(['--foo-bar'], ['foo-bar'])
testNormalOption(['--foo'], ['foo']);
testNormalOption(['--foo', '--bar'], ['foo', 'bar']);
testNormalOption(['--foo-bar'], ['foo-bar']);

0 comments on commit cd555f7

Please sign in to comment.