node icon indicating copy to clipboard operation
node copied to clipboard

add coverage-path and coverage-ignore-path in test_runner coverage.

Open pulkit-30 opened this issue 1 year ago • 4 comments

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

pulkit-30 avatar Dec 19 '23 17:12 pulkit-30