MCPcopy Index your code
hub / github.com/nodejs/node / getReportDetails

Method getReportDetails

lib/internal/test_runner/test.js:1628–1657  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1626 }
1627
1628 getReportDetails() {
1629 let directive;
1630 const details = { __proto__: null, duration_ms: this.duration() };
1631
1632 if (this.skipped) {
1633 directive = this.reporter.getSkip(this.message);
1634 } else if (this.isTodo) {
1635 directive = this.reporter.getTodo(this.message);
1636 } else if (this.expectFailure) {
1637 const message = typeof this.expectFailure === 'object' ?
1638 this.expectFailure.label :
1639 this.expectFailure;
1640 directive = this.reporter.getXFail(message);
1641 }
1642
1643 if (this.reportedType) {
1644 details.type = this.reportedType;
1645 }
1646 if (!this.passed) {
1647 details.error = this.error;
1648 }
1649 if (this.attempt !== undefined) {
1650 details.attempt = this.attempt;
1651 }
1652 if (this.passedAttempt !== undefined) {
1653 details.passed_on_attempt = this.passedAttempt;
1654 }
1655
1656 return { __proto__: null, details, directive };
1657 }
1658
1659 report() {
1660 countCompletedTest(this);

Callers 2

postRunMethod · 0.95
reportMethod · 0.95

Calls 4

durationMethod · 0.95
getSkipMethod · 0.80
getTodoMethod · 0.80
getXFailMethod · 0.80

Tested by

no test coverage detected