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

Method populateStats

packages/vitest/src/node/cache/files.ts:15–21  ·  view source on GitHub ↗
(root: string, specs: TestSpecification[])

Source from the content-addressed store, hash-verified

13 }
14
15 public async populateStats(root: string, specs: TestSpecification[]): Promise<void> {
16 const promises = specs.map((spec) => {
17 const key = `${spec.project.name}:${relative(root, spec.moduleId)}`
18 return this.updateStats(spec.moduleId, key)
19 })
20 await Promise.all(promises)
21 }
22
23 public async updateStats(fsPath: string, key: string): Promise<void> {
24 if (!fs.existsSync(fsPath)) {

Callers 1

startMethod · 0.80

Calls 3

updateStatsMethod · 0.95
allMethod · 0.80
relativeFunction · 0.50

Tested by

no test coverage detected