Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mergeReport (map, report) {
debug('Merge 1 report to map')
let sourceMap
if (report instanceof CoverageMap) {
sourceMap = report
} else {
sourceMap = new CoverageMap(report)
}
Object.keys(sourceMap.data).forEach((k) => {
let fc = sourceMap.data[k]
if (map.data[k]) {
this.mergeReportData(map.data[k], fc)
} else {
map.data[k] = fc
}
})
}