MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / getTestSelectionForNodes

Function getTestSelectionForNodes

src/shared/utils/test.ts:122–127  ·  view source on GitHub ↗
(nodes: TreeNode[])

Source from the content-addressed store, hash-verified

120}
121
122export function getTestSelectionForNodes(nodes: TreeNode[]): TestSelection[] | undefined {
123 if (nodes.find((node) => node instanceof SuiteNode))
124 return undefined;
125
126 return (nodes as Array<GroupNode | TestNode>).map((node) => getTestSelectionForNode(node));
127}
128
129function getTestSelectionForNode(treeNode: GroupNode | TestNode): TestSelection {
130 return { name: treeNode.name!, isGroup: treeNode instanceof GroupNode, position: treeNode.range?.start };

Callers 1

runTestsForNodeMethod · 0.90

Calls 1

getTestSelectionForNodeFunction · 0.85

Tested by

no test coverage detected