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

Function testTree

test/cli/test/static-collect.test.ts:1691–1702  ·  view source on GitHub ↗
(module: TestModule | TestSuite, tree: any = {}, fnFn?: boolean)

Source from the content-addressed store, hash-verified

1689}
1690
1691function testTree(module: TestModule | TestSuite, tree: any = {}, fnFn?: boolean) {
1692 for (const item of module.children) {
1693 if (item.type === 'test') {
1694 tree[item.name] = testItem(item, fnFn)
1695 }
1696 else {
1697 tree[item.name] ??= {}
1698 testTree(item, tree[item.name], fnFn)
1699 }
1700 }
1701 return tree
1702}
1703
1704function testItem(
1705 testCase: TestCase,

Callers 9

test-tags.test.tsFile · 0.70
mocking.test.tsFile · 0.70
collectTestsFunction · 0.70

Calls 1

testItemFunction · 0.85

Tested by

no test coverage detected