Skip to content

fix(browser): report mock conflicts between non-isolated files - #11643

Draft
sheremet-va wants to merge 1 commit into
mainfrom
fix/browser-non-isolated-mock-conflicts
Draft

sheremet-va wants to merge 1 commit into
mainfrom
fix/browser-non-isolated-mock-conflicts

Conversation

@sheremet-va

Copy link
Copy Markdown
Member

With isolate: false, the test files of a page share one document and one module instance per URL. A mock cannot replace a module that the page already imported, and a mock stays in the page for the files that run after it. Both cases now fail the test file with an error that names the module and the file that imported it first, instead of returning the wrong module. The same mock registered again from the same importer, like a setup file, is still accepted. The docs describe what works without isolation.

Refs #8933

@netlify

netlify Bot commented Oct 19, 2026

Copy link
Copy Markdown

✅ Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit fdc47f4
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6ad5da1fd29247fc0613432b
😎 Deploy Preview https://deploy-preview-11643--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant