Closed shmichael closed 4 days ago
vitest seems to expect the config file for the apps to be under the root
This is not accurate.
Our repo is private
I cannot help you if you can't provide any sort of reproduction.
Hello @shmichael. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction
will be closed if they have no activity within 3 days.
I have added a minimal reproduction here : https://stackblitz.com/edit/vitest-dev-vitest-hkrvhg
You can see in this screenshot that the same test fails in vscode test and the test is passing when run from terminal :
Describe the bug
In our monorepo we have:
/apps
- for micro services each with their own node-config setup/packages
- for reusable packages between apps.In the command line we run tests either globally (using turbo) or in specific apps (using
pnpm -F appname test
) - both work well.However, the vitest vscode plugin is only able to run tests in the
/packages
subdir. The tests under/apps
fail to run because vitest seems to expect the config file for the apps to be under the root:This is obviously not possible since different apps have different configs, which might overlap, and anyway we're interested in keeping app-specific configs under the relevant app.
Is there a fix that allows each app's test to correctly pull its relevant config?
Reproduction
Our repo is private
Output
Version
1.0.6
Validations