Files
Tim van der Lippe d3425b95d0 Update unit test NPM dependencies
Updates Karma, Mocha and Sinon.

R=jacktfranklin@chromium.org

Bug: none
Change-Id: Ia93cdafc646e4d3277e7ce869a7a8b5e66a13f0d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3372928
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
2022-01-07 14:26:50 +00:00
..
2022-01-07 14:26:50 +00:00
2022-01-07 14:26:50 +00:00
2020-11-09 17:42:16 +00:00
2020-11-09 17:42:16 +00:00
2022-01-07 14:26:50 +00:00
2020-11-09 17:42:16 +00:00

istanbul-lib-coverage

Greenkeeper badge Build Status

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);