MCPcopy Create free account
hub / github.com/ampproject/amphtml / karmaBrowserComplete_

Function karmaBrowserComplete_

build-system/tasks/runtime-test/helpers.js:142–156  ·  view source on GitHub ↗

* @param {object} browser * @return {Promise } * @private

(browser)

Source from the content-addressed store, hash-verified

140 * @private
141 */
142async function karmaBrowserComplete_(browser) {
143 const result = browser.lastResult;
144 result.total = result.success + result.failed + result.skipped;
145 // This used to be a warning with karma-browserify. See #16851 and #24957.
146 // Now, with karma-esbuild, this is a fatal error. See #34040.
147 if (result.total == 0) {
148 log(
149 red('ERROR:'),
150 'Karma returned a result with zero tests.',
151 'This usually indicates a transformation error. See logs above.'
152 );
153 log(cyan(JSON.stringify(result)));
154 process.exit(1);
155 }
156}
157
158/**
159 * @private

Callers

nothing calls this directly

Calls 5

redFunction · 0.85
cyanFunction · 0.85
stringifyMethod · 0.80
exitMethod · 0.80
logFunction · 0.50

Tested by

no test coverage detected