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

Function buildTestProjectTree

test/test-utils/index.ts:668–680  ·  view source on GitHub ↗
(testModules: TestModule[], onTestCase?: (result: TestCase) => unknown)

Source from the content-addressed store, hash-verified

666}
667
668export function buildTestProjectTree(testModules: TestModule[], onTestCase?: (result: TestCase) => unknown) {
669 const projectTree: Record<string, Record<string, any>> = {}
670
671 for (const testModule of testModules) {
672 const projectName = testModule.project.name
673 projectTree[projectName] = {
674 ...projectTree[projectName],
675 ...buildTestTree([testModule], onTestCase),
676 }
677 }
678
679 return projectTree
680}
681
682export function buildErrorProjectTree(testModules: TestModule[], options?: { stackTrace?: boolean; diff?: boolean }) {
683 const projectTree: Record<string, Record<string, any>> = {}

Callers 2

errors.test.tsFile · 0.90

Calls 1

buildTestTreeFunction · 0.85

Tested by

no test coverage detected