Open ascariandrea opened 11 months ago
Vitest uses only a single config per folder at the moment, it filters others out.
Thanks for the quick reply @sheremet-va, did I miss this point in the documentation or is not highlighted at all?
It's not highlighted, and looks like a bug to be honest.
Also encountered this when I tried to add a config file for unit tests and one for integration tests in the same folder. But simple enough to move to a subfolder for my integration tests as a workaround.
I think the initial idea was to filter out vite.config
if there is a vitest.config
in the same folder. Instead of the current solution, we should just remove vite.config
if there is already a vitest.config
in the folder.
@sheremet-va yes, the correct implementation I expect would filter out the vite(st).config
keeping all the others matching the glob pattern.
Describe the bug
Hi there, I'm having an issue with workspace configuration in my project. Basically, it runs all the tests only when configurations are defined inline, while it runs only the first matched when defined with the glob pattern.
In the reproduction I've defined the
vitest.workspace.ts
with both configurations (the glob pattern one is commented) so you can check this properly.Reproduction
https://stackblitz.com/edit/stackblitz-starters-qrhqud?file=vitest.workspace.ts
System Info
Used Package Manager
yarn
Validations