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

Method report

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

Source from the content-addressed store, hash-verified

1657 }
1658
1659 report() {
1660 countCompletedTest(this);
1661 if (this.outputSubtestCount > 0) {
1662 this.reporter.plan(this.subtests[0].nesting, this.loc, this.outputSubtestCount);
1663 } else {
1664 this.reportStarted();
1665 }
1666 const report = this.getReportDetails();
1667
1668 if (this.passed) {
1669 this.reporter.ok(
1670 this.nesting, this.loc, this.testNumber, this.name,
1671 report.details, report.directive, this.testId, this.parent?.testId, this.tags,
1672 );
1673 } else {
1674 this.reporter.fail(
1675 this.nesting, this.loc, this.testNumber, this.name,
1676 report.details, report.directive, this.testId, this.parent?.testId, this.tags,
1677 );
1678 }
1679
1680 for (let i = 0; i < this.diagnostics.length; i++) {
1681 this.reporter.diagnostic(this.nesting, this.loc, this.diagnostics[i]);
1682 }
1683 }
1684
1685 reportStarted() {
1686 if (this.#reportedSubtest || this.parent === null) {

Callers 1

finalizeMethod · 0.95

Calls 7

reportStartedMethod · 0.95
getReportDetailsMethod · 0.95
countCompletedTestFunction · 0.85
planMethod · 0.45
okMethod · 0.45
failMethod · 0.45
diagnosticMethod · 0.45

Tested by

no test coverage detected