Skip to content

Commit

Permalink
Fix: allow user to override reporter via cli option
Browse files Browse the repository at this point in the history
  • Loading branch information
11joselu committed Feb 9, 2022
1 parent 5f00788 commit fcb5c58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vitest/src/node/core.ts
Expand Up @@ -61,9 +61,10 @@ export class Vitest {
this.state = new StateManager()
this.snapshot = new SnapshotManager(resolved)
// @ts-expect-error cli type
this.reporters = toArray(resolved.reporters || resolved.reporter)
this.reporters = toArray(resolved.reporter || resolved.reporters)
.map((i) => {
if (typeof i === 'string') {
// @ts-expect-error cli type
const Reporter = ReportersMap[i]
if (!Reporter)
throw new Error(`Unknown reporter: ${i}`)
Expand Down

0 comments on commit fcb5c58

Please sign in to comment.