You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to include files completely missing tests from coverage reports? #4487
Linux razz 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
Other
Description
If I have two files, add.js and subtract.js along with tests for just one of them add.test.js which imports add.js I would like the --experimental-test-coverage to report that I have only tested 50% of files.
I've tried using --test-coverage-include='*.js' but this does not seem to include the additional files, I've also tried changing the test pattern node --test *.js which does seem to sort-of work, but it adds extra processing for every file (~1s per file) and logs it as a test suite file in the console, which is undesirable.
Is there a way to make sure coverage reports across all files with a given pattern?
This is a feature request for the project, as it's not a currently supported functionality, so I'm closing this in favor of github.com/orgs/nodejs/discussions/55447
Activity
swantzter commentedon Nov 7, 2024
Yes that does work but the runtime gets significantly worse and the logged output gets less useful
nullswan commentedon Nov 11, 2024
Related: https://github.com/orgs/nodejs/discussions/55447
avivkeller commentedon Apr 8, 2025
This is a feature request for the project, as it's not a currently supported functionality, so I'm closing this in favor of github.com/orgs/nodejs/discussions/55447