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

Function publicCollect

packages/runner/src/run.ts:1093–1104  ·  view source on GitHub ↗
(specs: string[] | FileSpecification[], runner: VitestRunner)

Source from the content-addressed store, hash-verified

1091}
1092
1093async function publicCollect(specs: string[] | FileSpecification[], runner: VitestRunner): Promise<File[]> {
1094 runner.trace ??= defaultTrace
1095
1096 const paths = specs.map(f => typeof f === 'string' ? f : f.filepath)
1097
1098 await runner.onBeforeCollect?.(paths)
1099
1100 const files = await collectTests(specs, runner)
1101
1102 await runner.onCollected?.(files)
1103 return files
1104}
1105
1106export { publicCollect as collectTests }

Callers

nothing calls this directly

Calls 1

collectTestsFunction · 0.90

Tested by

no test coverage detected