MCPcopy
hub / github.com/ampproject/amphtml / logError

Function logError

build-system/tasks/server-tests.js:132–140  ·  view source on GitHub ↗

* Logs a test error * * @param {string} testName * @param {Error} err

(testName, err)

Source from the content-addressed store, hash-verified

130 * @param {Error} err
131 */
132function logError(testName, err) {
133 const {message} = err;
134 logWithoutTimestamp(red('✖'), 'Failed', cyan(testName));
135 console /*OK*/
136 .group();
137 logWithoutTimestamp(message.split('\n').splice(3).join('\n'));
138 console /*OK*/
139 .groupEnd();
140}
141
142/**
143 * Reports total number of passing / failing tests

Callers 1

runTestFunction · 0.85

Calls 4

logWithoutTimestampFunction · 0.85
redFunction · 0.85
cyanFunction · 0.85
groupMethod · 0.80

Tested by

no test coverage detected