Unfortunately I could not reproduce this behaviour in a fresh repo.
Describe the bug
Using defineVitestConfig from @nuxt/test-utils gives me some errors on random(?) test files located in a specific folder (./src/plugins/ in this case). It seems that vitest doesn't find those tests inside this directory (No test suite found in file /omniweb/gsd/src/plugins/frontend-commons.spec.ts). I tried to place a simple test.spec.ts inside with a basic test but it doesn't pick that up either.
However if I move those test files to another directory at the same level (plugins2) it runs those test. If I rename the folder to plugins it again does not run those test files...
I really can't imagine what's going on here. Are there some forbidden path patterns for some reason?
Additional context
If I use defineConfig from vite these tests will run. But I need to use the Nuxt import since it helps with those nuxt import aliases like #app etc.
Environment
Reproduction
Unfortunately I could not reproduce this behaviour in a fresh repo.
Describe the bug
Using
defineVitestConfig
from@nuxt/test-utils
gives me some errors on random(?) test files located in a specific folder (./src/plugins/
in this case). It seems that vitest doesn't find those tests inside this directory (No test suite found in file /omniweb/gsd/src/plugins/frontend-commons.spec.ts
). I tried to place a simpletest.spec.ts
inside with a basic test but it doesn't pick that up either. However if I move those test files to another directory at the same level (plugins2
) it runs those test. If I rename the folder toplugins
it again does not run those test files...I really can't imagine what's going on here. Are there some forbidden path patterns for some reason?
Additional context
If I use
defineConfig
fromvite
these tests will run. But I need to use the Nuxt import since it helps with those nuxt import aliases like#app
etc.Logs
No response