Skip to content

Commit bc255c4

Browse files
committed
fixup! benchmark: skip running some assert benchmarks by default
1 parent 0d414db commit bc255c4

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

benchmark/assert/match.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ const bench = common.createBenchmark(main, {
77
n: [2e7],
88
method: ['match', 'doesNotMatch'],
99
}, {
10-
combinationFilter() {
10+
combinationFilter(p) {
1111
// These benchmarks purposefully do not run by default. They do not provide
1212
// might insight, due to only being a small wrapper around a native regexp
1313
// call.
14-
return false;
14+
return p.n === 1;
1515
},
1616
});
1717

benchmark/assert/rejects.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ const bench = common.createBenchmark(main, {
77
n: [2e5],
88
method: ['rejects', 'doesNotReject'],
99
}, {
10-
combinationFilter() {
10+
combinationFilter(p) {
1111
// These benchmarks purposefully do not run by default. They do not provide
1212
// much insight, due to only being a small wrapper around a native promise
1313
// with a few extra checks.
14-
return false;
14+
return p.n === 1;
1515
},
1616
});
1717

benchmark/assert/strictequal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ const bench = common.createBenchmark(main, {
88
type: ['string', 'object', 'number'],
99
method: ['strictEqual', 'notStrictEqual'],
1010
}, {
11-
combinationFilter() {
11+
combinationFilter(p) {
1212
// These benchmarks purposefully do not run by default. They do not provide
1313
// much insight, due to only being a small wrapper around `Object.is()`.
14-
return false;
14+
return p.n === 1;
1515
},
1616
});
1717

benchmark/assert/throws.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ const bench = common.createBenchmark(main, {
77
n: [2e5],
88
method: ['throws', 'doesNotThrow'],
99
}, {
10-
combinationFilter() {
10+
combinationFilter(p) {
1111
// These benchmarks purposefully do not run by default. They do not provide
1212
// much insight, due to only being a small wrapper around a try / catch.
13-
return false;
13+
return p.n === 1;
1414
},
1515
});
1616

0 commit comments

Comments
 (0)