mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-28 13:13:37 +08:00
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>
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);