When using @vue/cli-plugin-unit-jest, I am receiving coverage reports each time I run my unit tests, regardless of whether I have the --coverage
flag in the execution line or not. I do not want to receive coverage reports on all of my untested files. When searching for an answer online, there are numerous questions about how to turn that feature on, not turn it off. I can't find it in the documentation either.
How do you disable the Coverage on Untested Files
feature in Jest?
Disabling coverage similar to enabling it, just prefix the pattern with an !
like so:
{
"collectCoverageFrom": [
"**/*.{js,jsx}",
"!**/node_modules/**",
"!**/folder-with-untested-files/**"
]
}
Or disable coverage all together with "collectCoverage": false
.
If that does not work, then you have this params overridden somewhere in your code.
"collectCoverage": false
in jest.config.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With