Issue with Overwriting Default Exclude Patterns in Coverage Configuration #5462
-
Hey there! I've been working on integrating Vitest into our project for test coverage, and I bumped into a bit of a hiccup with the coverage configuration, particularly around excluding files and folders. Our project has a specific need to exclude certain paths from the coveragestirues. To achieve this, I added these patterns to the exclude array in our Vitest configuration, like so:
However, after doing this, I noticed that the defaults usually excluded by Vitest (as mentioned in the official documentation) are no longer automatically excluded. It seems like specifying any custom paths in the exclude array overrides these defaults completely. This isn't ideal since I'd prefer not to manually list all the default patterns again in my configuration just to keep them excluded. I was hoping there might be a way to add to the existing defaults rather than replacing them entirely. Is this a known issue, or is there perhaps a workaround I'm not aware of? It would be great to ensure the defaults are maintained while still being able to specify additional paths to exclude. Thanks for any guidance you can provide! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You'll need to extend the default values. I was just updating this to the documentation: 59c71d2
|
Beta Was this translation helpful? Give feedback.
You'll need to extend the default values. I was just updating this to the documentation: 59c71d2