(nodes: TreeNode[])
| 120 | } |
| 121 | |
| 122 | export 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 | |
| 129 | function getTestSelectionForNode(treeNode: GroupNode | TestNode): TestSelection { |
| 130 | return { name: treeNode.name!, isGroup: treeNode instanceof GroupNode, position: treeNode.range?.start }; |
no test coverage detected