test: run misc benchmark only once in tests
Prevent misc benchmark files from running more than one benchmark during tests. PR-URL: https://github.com/nodejs/node/pull/21046 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
parent
8944a4f162
commit
5d4c5d3f71
@ -9,6 +9,10 @@ const bench = common.createBenchmark(main, {
|
||||
});
|
||||
|
||||
function main({ n, type }) {
|
||||
// Default value for tests.
|
||||
if (type === '')
|
||||
type = 'extend';
|
||||
|
||||
let fn;
|
||||
if (type === 'extend') {
|
||||
fn = util._extend;
|
||||
|
@ -9,6 +9,6 @@ runBenchmark('misc', [
|
||||
'dur=0.1',
|
||||
'method=',
|
||||
'n=1',
|
||||
'type=extend',
|
||||
'val=magyarország.icom.museum'
|
||||
'type=',
|
||||
'val=magyarország.icom.museum',
|
||||
], { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
Loading…
x
Reference in New Issue
Block a user