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

Function testsCollector

packages/ui/client/composables/explorer/collector.ts:500–512  ·  view source on GitHub ↗
(suite: Arrayable<Task>)

Source from the content-addressed store, hash-verified

498}
499
500function* testsCollector(suite: Arrayable<Task>): Generator<Test> {
501 const arraySuites = toArray(suite)
502 let s: Task
503 for (let i = 0; i < arraySuites.length; i++) {
504 s = arraySuites[i]
505 if (isTestCase(s)) {
506 yield s
507 }
508 else {
509 yield* testsCollector(s.tasks)
510 }
511 }
512}

Callers 1

collectTestsFunction · 0.85

Calls 2

toArrayFunction · 0.90
isTestCaseFunction · 0.90

Tested by

no test coverage detected