Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else {
mergedCoverageMap = map;
}
}
}
if (mergedCoverageMap === null) {
console.warn('Warning: No cover files to be merged');
return;
}
var context = libReport.createContext({
dir: path.join(rootFolder, mergeIntoFolder)
});
tree = libReport.summarizers.pkg(mergedCoverageMap);
tree.visit(reports.create('html'), context);
tree.visit(reports.create('lcov'), context);
fs.writeFileSync(path.join(rootFolder, '..', '..', '.nyc_output', 'coverage-final.json'), JSON.stringify(mergedCoverageMap.toJSON()));