diff --git a/packages/vitest/src/node/core.ts b/packages/vitest/src/node/core.ts index 96463c745..bc38c4e70 100644 --- a/packages/vitest/src/node/core.ts +++ b/packages/vitest/src/node/core.ts @@ -226,6 +226,7 @@ export class Vitest { const invalidates = Array.from(this.invalidates) this.invalidates.clear() this.snapshot.clear() + this.state.clearErrors() try { await this.pool.runTests(files, invalidates) } diff --git a/packages/vitest/src/node/reporters/base.ts b/packages/vitest/src/node/reporters/base.ts index 0560c907e..0d2e7373a 100644 --- a/packages/vitest/src/node/reporters/base.ts +++ b/packages/vitest/src/node/reporters/base.ts @@ -122,7 +122,6 @@ export abstract class BaseReporter implements Reporter { async onWatcherRerun(files: string[], trigger?: string) { this.watchFilters = files - this.ctx.state.clearErrors() this.ctx.clearScreen() this.ctx.log(`\n${c.inverse(c.bold(c.blue(' RERUN ')))}${trigger ? c.dim(` ${this.relative(trigger)}\n`) : ''}`) this.start = performance.now()