code-coverage
code-coverage copied to clipboard
Seems "exclude" is ONLY respected by NYC report generation if excludeAfterRemap: true
We want to respect "exclude" at all times, I think
Yea I'm currently pulling my hair out trying to exclude node_modules from the report generation and I'm almost certain cypress is the problem.
https://stackoverflow.com/questions/61667843/how-do-i-exclude-node-modules-from-my-code-coverage
I've just confirmed adding excludeAfterRemap excludes the correct files but also breaks test coverage entirely.
I also have an issue that excludeAfterRemap: true causes some files to be excluded, but more than I specified are excluded, and oddly, it seems the exclusions only occur if I have codeCoverage.exclude set (and not package.json's nyc.exclude).
Also if I remove excludeAfterRemap: true, then all the files show up without designated exclusions (whether specified in package.json or cypress.config.json). nyc report in this state likewise does not show the excluded files, but the lcov-report does show them when excludeAfterRemap: true is removed.