Browser mode: unable to mock modules from workspace projects #7411
Labels
feat: browser
Issues and PRs related to the browser runner
p3-minor-bug
An edge case that only affects very specific usage (priority)
Describe the bug
When using npm workspaces and attempting to mock a module from an adjacent workspace project, vitest in browser mode silently fails to mock modules from other projects in the same workspace. Running the tests with the vitest defaults works as expected.
Reproduction
https://github.com/jrobinson01/vitest-browser-workspace-mocks-issue
install deps then cd into package-a and run
npm run test
to run the test using vitest. Tests should pass. Runnpm run test:browser
and observe the failing test.System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: