Skip to content

Commit

Permalink
fix: ignore benchmark.reporters in getSerializableConfig (#2164)
Browse files Browse the repository at this point in the history
  • Loading branch information
kainstar committed Oct 18, 2022
1 parent 8b84e1f commit 909a31d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/vitest/src/node/core.ts
Expand Up @@ -142,6 +142,10 @@ export class Vitest {
...this.config.sequence,
sequencer: undefined!,
},
benchmark: {
...this.config.benchmark,
reporters: [],
} as ResolvedConfig['benchmark'],
},
this.configOverride || {} as any,
) as ResolvedConfig
Expand Down
15 changes: 14 additions & 1 deletion test/benchmark/vitest.config.ts
@@ -1,12 +1,25 @@
import { defineConfig } from 'vitest/config'

const noop = () => {}

export default defineConfig({
test: {
update: false,
allowOnly: true,
benchmark: {
outputFile: './bench.json',
reporters: ['json'],
reporters: ['json', {
onInit: noop,
onPathsCollected: noop,
onCollected: noop,
onFinished: noop,
onTaskUpdate: noop,
onTestRemoved: noop,
onWatcherStart: noop,
onWatcherRerun: noop,
onServerRestart: noop,
onUserConsoleLog: noop,
}],
},
},
})

0 comments on commit 909a31d

Please sign in to comment.