Skip to content

Commit

Permalink
fix: disable reporters during collection
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Dec 1, 2024
1 parent 1f99fa6 commit 4ec52fd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/vitest/src/node/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,15 @@ export class Vitest {
return { tests: [], errors: [] }
}

await this.collectFiles(files)
const reporters = this.reporters
this.reporters = []

try {
await this.collectFiles(files)
}
finally {
this.reporters = reporters
}

return {
tests: this.state.getFiles(),
Expand Down

0 comments on commit 4ec52fd

Please sign in to comment.