MCPcopy
hub / github.com/vitest-dev/vitest / onTestRunStart

Method onTestRunStart

packages/vitest/src/node/coverage.ts:354–375  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

352 }
353
354 async onTestRunStart(): Promise<void> {
355 if (this.options.changed) {
356 try {
357 const changedFiles = await this.ctx.vcs.findChangedFiles({
358 root: this.ctx.config.root,
359 changedSince: this.options.changed,
360 })
361
362 this.changedFiles = changedFiles
363 }
364 catch {
365 this.changedFiles = undefined
366 }
367 }
368 else if (this.ctx.config.changed) {
369 this.changedFiles = this.ctx.config.related
370 }
371
372 if (this.changedFiles) {
373 this.globCache.clear()
374 }
375 }
376
377 async onTestFailure(): Promise<void> {
378 if (!this.options.reportOnFailure) {

Callers

nothing calls this directly

Calls 2

findChangedFilesMethod · 0.65
clearMethod · 0.65

Tested by

no test coverage detected