(suitePath: string)
| 289 | } |
| 290 | |
| 291 | public getOrCreateSuite(suitePath: string): [SuiteData, boolean] { |
| 292 | const existingSuite = this.suites.getForPath(suitePath); |
| 293 | if (existingSuite) |
| 294 | return [existingSuite, false]; |
| 295 | |
| 296 | const projectPath = locateBestProjectRoot(suitePath); |
| 297 | const parent = projectPath ? this.getOrCreateProjectNode(projectPath) : undefined; |
| 298 | const suite = new SuiteData(suitePath, projectPath, parent); |
| 299 | |
| 300 | if (parent) { |
| 301 | parent.children.push(suite.node); |
| 302 | this.updateNode({ node: parent }); |
| 303 | } |
| 304 | this.suites.setForPath(suitePath, suite); |
| 305 | return [suite, true]; |
| 306 | } |
| 307 | |
| 308 | private getOrCreateProjectNode(projectPath: string): ProjectNode { |
| 309 | const existingProject = this.projectNodes.get(projectPath); |
no test coverage detected