Open jmcgavin opened 2 years ago
Relates to #1873
@LarsDenBakker would love to have your feedback on this. 😃
I'm not sure the "all" flag would change anything here. Did anyone test this? I think we need to see all the files in the browser to make them show up in the coverage.
This may be overkill but here's a workaround:
This may be overkill but here's a workaround:
before running web-test-runner, run a new script that finds all your files
using that script, generate a new TS/JS file that imports all the found file paths from step 1
include that new file in the test files that web-test-runner executes
now all your files are included in the coverage report because the browser imported them all!
Another approach instead of creating a new test file is to add it to Istanbul reporter as 0 coverage for all files found then merge the coverage data found.
The
includes
property of thecoverageConfig
object does not include untested files in the code coverage. Only files visited during tests are included in the coverage.I think having the option to include the entire codebase in the code coverage output is a good idea. Either through the
includes
property or the addition of anall
property like the--all
flag that can be used with istanbul/nyc or c8.