You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use workspace on a single package that contains both server side and client side code, as well as code that can run on both environments.
I created one Vitest project config for each platform.
When filtering tests using project filter in watch mode, it run the shared tests on both projects instead of the project that I tried to filter.
src
client
server
shared
vitest.config.browser.ts # run tests in `client` and `shared` folder
vitest.config.node.ts # run tests is `server` and `shared` folder
vitest.workspace.ts
vitest run --project=node is working correctly.
This issue only occurs in watch mode.
Describe the bug
I tried to use workspace on a single package that contains both server side and client side code, as well as code that can run on both environments.
I created one Vitest project config for each platform.
When filtering tests using project filter in watch mode, it run the shared tests on both projects instead of the project that I tried to filter.
vitest run --project=node
is working correctly.This issue only occurs in watch mode.
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-project-filter-issue
press
w
and enternode
to filter thenode
project.you will observe
|browser| src/shared/some.test.ts
is also executed.System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: