Package Exports
- istanbul-lib-coverage
- istanbul-lib-coverage/index.js
- istanbul-lib-coverage/lib/coverage-map
- istanbul-lib-coverage/lib/coverage-map.js
- istanbul-lib-coverage/lib/file-coverage
- istanbul-lib-coverage/lib/file-coverage.js
- istanbul-lib-coverage/package.json
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (istanbul-lib-coverage) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
istanbul-lib-coverage
An API that provides a read-only view of coverage information with the ability to merge and summarize coverage info.
Supersedes object-utils
and collector
from the v0 istanbul API.
See the docs for the full API.
var libCoverage = require('istanbul-lib-coverage');
var map = libCoverage.createCoverageMap(globalCoverageVar);
var summary = libCoverage.createCoverageSummary();
// merge another coverage map into the one we created
map.merge(otherCoverageMap);
// inspect and summarize all file coverage objects in the map
map.files().forEach(function(f) {
var fc = map.fileCoverageFor(f),
s = fc.toSummary();
summary.merge(s);
});
console.log('Global summary', summary);