(suiteOrDirectoryPath: string)
| 351 | } |
| 352 | |
| 353 | public clearSuiteOrDirectory(suiteOrDirectoryPath: string): void { |
| 354 | // We can't tell if it's a file or directory because it's already been deleted, so just |
| 355 | // try both. |
| 356 | const nodesToRemove = new Set<TreeNode>(); |
| 357 | const suite = this.suites.getForPath(suiteOrDirectoryPath); |
| 358 | if (suite) { |
| 359 | nodesToRemove.add(suite.node); |
| 360 | this.suites.deleteForPath(suiteOrDirectoryPath); |
| 361 | } else { |
| 362 | for (const suitePath of Object.keys(this.suites)) { |
| 363 | if (isWithinPath(suitePath, suiteOrDirectoryPath)) { |
| 364 | const suite = this.suites.getForPath(suitePath); |
| 365 | if (suite) |
| 366 | nodesToRemove.add(suite.node); |
| 367 | this.suites.deleteForPath(suitePath); |
| 368 | } |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | if (nodesToRemove.size) { |
| 373 | for (const node of nodesToRemove) { |
| 374 | this.removeNode(node); |
| 375 | } |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | public handleSkippedTestsConfigChange(): void { |
| 380 | // Skipped tests affect the total count labels. |
no test coverage detected