-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] can we use multiple v8-json files to merge coverage? #78
Comments
The {
// ...
dataDir: "./coverage/v8-coverage"
// ...
} see example: https://github.com/tstyche/tstyche/blob/main/scripts/report-coverage.js Also there is API await mcr.addFromDir("./coverage/v8-coverage");
await mcr.generate(); The MCR will automatically merge all the added coverage data when executing await mcr.addFromDir("./coverage/v8-coverage1");
await mcr.addFromDir("./coverage/v8-coverage2");
await mcr.generate(); |
V8-json is one of the format your report provided. What I mean is I found using raw files to merge is a little bit complicated: it still need to scan the source folder, and the config for merging report needs to combine both playwright report config and jest report config. So I am thinking if jest and playwright both generate v8 json files, and both include all files information, it would be great if we can just merge 2 json files |
I see, you are using However, perhaps we could try using independent MCR to collect and generate coverage reports directly (without monocart-reporter). |
BTW, if you are using Github Actions or similar CI/CD workflow/piplines like Jenkins, there should be a way to upload and download the see GithubActions example: https://github.com/cenfun/merge-code-coverage/blob/main/.github/workflows/main.yml |
Could you explain details how your example can help? My use case is exactly same as this: https://github.com/cenfun/merge-code-coverage I wonder if we can simply merge the generated coverage-report.json files |
No, We can not merge with the generated |
In fact, merging coverage data is very complex. Even for Istanbul
The possible reason is that different versions of |
Got it, thank you |
In order to merge multiple v8 coverage report, does monocart support merging json files instead of raw files like nyc for Istanbul?
The text was updated successfully, but these errors were encountered: