Skip to content

Commit

Permalink
Prevent merged lcov.info to be included in the merge
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter committed Mar 28, 2022
1 parent d9f1a09 commit 79ea17a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/coverage-merger.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ const getLcovFiles = function (src) {
};

(async function(){
const files = await getLcovFiles('coverage');
const appsFiles = await getLcovFiles('coverage/apps');
const libsFiles = await getLcovFiles('coverage/libs');
const files = appsFiles.concat(libsFiles);
console.log('files', files);
const mergedReport = files.reduce((mergedReport, currFile) => mergedReport += fs.readFileSync(currFile), '');
await fs.writeFile(path.resolve('./coverage/lcov.info'), mergedReport, (err) => {
if (err) throw err;
Expand Down

0 comments on commit 79ea17a

Please sign in to comment.