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

Function addTestError

build-system/tasks/visual-diff/index.js:210–216  ·  view source on GitHub ↗

* Adds a test error and logs it if running locally (not as part of CI). * * @param {!Array<!TestErrorDef>} testErrors array of testError objects. * @param {string} name full name of the test. * @param {string} message extra information about the failure. * @param {Error} error error object with

(testErrors, name, message, error, consoleMessages)

Source from the content-addressed store, hash-verified

208 * messages printed so far.
209 */
210function addTestError(testErrors, name, message, error, consoleMessages) {
211 const testError = {name, message, error, consoleMessages};
212 if (!isCiBuild()) {
213 logTestError(testError);
214 }
215 testErrors.push(testError);
216}
217
218/**
219 * Logs a test error (regardless of where it's running).

Callers 1

snapshotWebpagesFunction · 0.85

Calls 3

isCiBuildFunction · 0.85
logTestErrorFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected