cenfun / monocart-reporter

A playwright test reporter (Node.js)
https://cenfun.github.io/monocart-reporter/
MIT License
207 stars 12 forks source link

Suggestion: provide addEmptyCoverage function #94

Closed stevez closed 8 months ago

stevez commented 8 months ago

I tried to implement the add empty coverage for all the source files, but I found it has too many dependencies, I feel it would be nice to provide an additional function besides attachCoverage and addCoverage, or even can be configured as an option

cenfun commented 8 months ago

Thanks for the suggestion. Please try new version monocart-reporter@2.3.4, it supports new option all for adding the empty coverage for all files

{
  coverage: {
    all: {
            dir: ['./src'],
            filter: '**/*.js'
        }
  }
}

see https://github.com/cenfun/monocart-coverage-reports?tab=readme-ov-file#adding-empty-coverage-for-untested-files