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

Function reportCoverage

build-system/tasks/e2e/describes-e2e.js:357–364  ·  view source on GitHub ↗

* Reports code coverage data to an aggregating endpoint. * @return {Promise }

()

Source from the content-addressed store, hash-verified

355 * @return {Promise<void>}
356 */
357async function reportCoverage() {
358 const coverage = istanbulMiddleware.getCoverageObject();
359 await fetch(`https://${HOST}:${PORT}${COV_REPORT_PATH}`, {
360 method: 'POST',
361 body: JSON.stringify(coverage),
362 headers: {'Content-type': 'application/json'},
363 });
364}
365
366/**
367 * Returns a wrapped version of Mocha's describe(), it() and only() methods

Callers 1

doTemplateFunction · 0.85

Calls 2

fetchFunction · 0.85
stringifyMethod · 0.80

Tested by

no test coverage detected