Skip to content
Closed
Show file tree
Hide file tree
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
Next Next commit
test: run misc benchmark only once in tests
Prevent misc benchmark files from running more than one benchmark
during tests.
  • Loading branch information
Trott committed Jun 15, 2018
commit 7cb42ac00048f52a4d8e7d9db99c65b26fee2484
4 changes: 4 additions & 0 deletions benchmark/misc/util-extend-vs-object-assign.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-benchmark-misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });