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

Function hasTests

packages/runner/src/utils/tasks.ts:45–49  ·  view source on GitHub ↗
(suite: Arrayable<Suite>)

Source from the content-addressed store, hash-verified

43}
44
45export function hasTests(suite: Arrayable<Suite>): boolean {
46 return toArray(suite).some(s =>
47 s.tasks.some(c => isTestCase(c) || hasTests(c)),
48 )
49}
50
51export function hasFailed(suite: Arrayable<Task>): boolean {
52 return toArray(suite).some(

Callers 1

runSuiteFunction · 0.90

Calls 2

toArrayFunction · 0.90
isTestCaseFunction · 0.85

Tested by

no test coverage detected