Skip to content

Commit

Permalink
fix: don't show a warning for Vitest 3
Browse files Browse the repository at this point in the history
Closes #562
  • Loading branch information
sheremet-va committed Jan 9, 2025
1 parent 71f74dc commit 45d13e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/worker/vitest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,12 @@ export class Vitest implements VitestMethods {
}

private handleFileChanged(file: string): string[] {
return (this.ctx as any).handleFileChanged(file)
const ctx = this.ctx as any
// support Vitest 3
if (ctx.watcher) {
return ctx.watcher.handleFileChanged(file) ? [file] : []
}
return ctx.handleFileChanged(file)
}

private scheduleRerun(files: string[]): Promise<void> {
Expand Down

0 comments on commit 45d13e9

Please sign in to comment.