node
node copied to clipboard
add coverage-path and coverage-ignore-path in test_runner coverage.
What is the problem this feature will solve?
coverage-path
: to specify the path from which the coverage summary should be collected. and
coverage-ignore-path
: to specify the files and directories that should be ignored while collecting coverage.
these can be two cli flags also, passed along with --test-coverage
flag.
something like this:
node --test --experimental-test-coverage --coverage-path='./src/**' --coverage-ignore='./src/utils/**' index.test.mjs
What is the feature you are proposing to solve the problem?
currently, there is no way to include or exclude a file or directory from test coverage.
What alternatives have you considered?
No response