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

Function formatError

lib/internal/test_runner/reporter/utils.js:61–69  ·  view source on GitHub ↗
(error, indent)

Source from the content-addressed store, hash-verified

59}
60
61function formatError(error, indent) {
62 const err = error.code === 'ERR_TEST_FAILURE' ? error.cause : error;
63 const message = ArrayPrototypeJoin(
64 RegExpPrototypeSymbolSplit(
65 hardenRegExp(/\r?\n/),
66 inspectWithNoCustomRetry(err, inspectOptions),
67 ), `\n${indent} `);
68 return `\n${indent} ${message}\n`;
69}
70
71function formatTestReport(type, data, showErrorDetails = true, prefix = '', indent = '') {
72 let color = reporterColorMap[type] ?? colors.white;

Callers 1

formatTestReportFunction · 0.70

Calls 1

inspectWithNoCustomRetryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…