(projectPath: string)
| 1430 | } |
| 1431 | |
| 1432 | export function findProjectNode(projectPath: string): vs.TestItem { |
| 1433 | const projectID = `PROJECT:${projectPath}`; |
| 1434 | const workspaceFolder = vs.workspace.getWorkspaceFolder(vs.Uri.file(projectPath)); |
| 1435 | const workspaceFolderPath = workspaceFolder ? fsPath(workspaceFolder.uri) : undefined; |
| 1436 | const workspaceFolderID = workspaceFolderPath ? `WF:${workspaceFolderPath}` : undefined; |
| 1437 | |
| 1438 | const controller = privateApi.testController!; |
| 1439 | const node = controller.controller.items.get(projectID) |
| 1440 | ?? (workspaceFolderID ? controller.controller.items.get(workspaceFolderID)?.children.get(projectID) : undefined); |
| 1441 | |
| 1442 | if (!node) |
| 1443 | throw new Error(`Could not find project node for ${projectPath}:\n ${workspaceFolderID}\n ${projectID}`); |
| 1444 | |
| 1445 | return node; |
| 1446 | } |
| 1447 | |
| 1448 | export function makeTestTextTree({ items, uriFilter, buffer = [], indent = 0, onlyFailures, onlyActive, sortByLabel }: { items?: vs.TestItemCollection, uriFilter?: vs.Uri, buffer?: string[]; indent?: number, onlyFailures?: boolean, onlyActive?: boolean, sortByLabel?: boolean } = {}): string[] { |
| 1449 | const controller = privateApi.testController!; |
no test coverage detected