MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / testDone

Method testDone

src/shared/test/test_model.ts:629–656  ·  view source on GitHub ↗
(dartCodeDebugSessionID: string, suitePath: string, testID: number, result: "skipped" | "success" | "failure" | "error" | undefined, endTime: number | undefined)

Source from the content-addressed store, hash-verified

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)!;
631 const testNode = suite.getCurrentTest(dartCodeDebugSessionID, testID)!;
632
633 if (result === "skipped") {
634 testNode.status = TestStatus.Skipped;
635 } else if (result === "success") {
636 testNode.status = TestStatus.Passed;
637 } else if (result === "failure") {
638 testNode.status = TestStatus.Failed;
639 } else if (result === "error")
640 testNode.status = TestStatus.Failed;
641 else {
642 testNode.status = TestStatus.Unknown;
643 }
644 if (endTime && testNode.testStartTime) {
645 testNode.duration = endTime - testNode.testStartTime;
646 testNode.description = ``;
647 // Don't clear this, as concurrent runs will overwrite each
648 // other and then we'll get no time at the end.
649 // testNode.testStartTime = undefined;
650 }
651
652 this.updateTestCountLabels(testNode, true, "UP");
653
654 if (dartCodeDebugSessionID)
655 this.testEventListeners.forEach((l) => l.testDone(dartCodeDebugSessionID, testNode, result));
656 }
657
658 public suiteDone(dartCodeDebugSessionID: string | undefined, suitePath: string): void {
659 const suite = this.suites.getForPath(suitePath);

Callers

nothing calls this directly

Calls 4

updateTestCountLabelsMethod · 0.95
getForPathMethod · 0.80
getCurrentTestMethod · 0.80
testDoneMethod · 0.65

Tested by

no test coverage detected