* If this node is from a result, track its location so we can keep it up-to-date as the user edits the file.
(node: GroupNode | TestNode, source: TestSource, suitePath: string, range: Range | undefined, nodePath: string | undefined)
| 599 | * If this node is from a result, track its location so we can keep it up-to-date as the user edits the file. |
| 600 | */ |
| 601 | private setupRangeTracking(node: GroupNode | TestNode, source: TestSource, suitePath: string, range: Range | undefined, nodePath: string | undefined): void { |
| 602 | // Dispose any previous tracker, because we may create a new one below if this new |
| 603 | // location needs tracking. |
| 604 | node.dispose(); |
| 605 | |
| 606 | if (!range || !nodePath || !this.config.dynamicTestTracking) |
| 607 | return; |
| 608 | |
| 609 | if (source !== TestSource.Result || node.testSource !== TestSource.Result) |
| 610 | return; |
| 611 | |
| 612 | void this.rangeTracker.trackRangeForUri( |
| 613 | URI.file(suitePath), |
| 614 | range, |
| 615 | (newRange) => { |
| 616 | if (newRange) { |
| 617 | node.range = newRange; |
| 618 | this.updateNode({ node }); |
| 619 | } else { |
| 620 | this.removeNode(node); |
| 621 | } |
| 622 | }, |
| 623 | ).then( |
| 624 | (tracker) => node.rangeTracker = tracker, |
| 625 | (e) => this.logger.error(e), |
| 626 | ); |
| 627 | } |
| 628 | |
| 629 | public testDone(dartCodeDebugSessionID: string, suitePath: string, testID: number, result: "skipped" | "success" | "failure" | "error" | undefined, endTime: number | undefined): void { |
| 630 | const suite = this.suites.getForPath(suitePath)!; |
no test coverage detected