The file is being overwritten every time a new test suite runs (more precisely, every time "write" is being called), making it impossible to merge the code coverage for multiple test suites.
If separate files are generated for each test suite, then a merged report can be created with "nyc report".
For example, at the end of a test suite I can put something like this:
The file is being overwritten every time a new test suite runs (more precisely, every time "write" is being called), making it impossible to merge the code coverage for multiple test suites. If separate files are generated for each test suite, then a merged report can be created with "nyc report". For example, at the end of a test suite I can put something like this:
and then use that option in https://github.com/istanbuljs/puppeteer-to-istanbul/blob/master/lib/puppeteer-to-istanbul.js line 27:
This way the test suites will generate separate files, that can be at the end merged with "nyc report".
const outFilePath =
${this.storagePath}/${this.options.outputName || 'out'}.json