Skip to content

fix(browser): mock assets and computed dynamic imports - #11954

Merged
sheremet-va merged 4 commits into
mainfrom
fix/browser-mock-import-urls
Nov 25, 2026
Merged

sheremet-va merged 4 commits into
mainfrom
fix/browser-mock-import-urls

Conversation

@sheremet-va

Copy link
Copy Markdown
Member

Fixes #11952

  • vi.mock of a module that Vite imports with an import query (.svg, .json, ?raw, ?component) was ignored with import map mocks
  • a mock of a module with a query was ignored with import map mocks after the module changed in watch mode
  • import(path) with a computed specifier ignored mocks

@netlify

netlify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 43699a2
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6b069366aa5dd76243baad95
😎 Deploy Preview https://deploy-preview-11954--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.

@flakiness-io

flakiness-io Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Test Results Summary

This comment shows the latest test results for this pull request.

Commit Status Test Results CI Runs
20ddfd9 ❌ Failed 1 failed · 32316 passed · 236 flaky · 1192 skipped 29 runs

1 failed

❌ Ubuntu 26.04 · chromium test/ui/test/ui.spec.ts:217 › ui › annotations in the report tab

⚠️ 236 flaky

⚠️ Ubuntu 26.04 · vmThreads test/unit/test/retry.test.ts:55 › describe object add(1, 1) › returned value not be greater than 2
⚠️ Ubuntu 26.04 · vmThreads test/unit/test/retry.test.ts:55 › describe object add(1, 1) › returned value not be greater than 2
⚠️ Ubuntu 26.04 · threads test/unit/test/retry.test.ts:55 › describe object add(1, 1) › returned value not be greater than 2
⚠️ win 10.0.26100 · vmThreads test/unit/test/retry.test.ts:55 › describe object add(1, 1) › returned value not be greater than 2
⚠️ Ubuntu 26.04 · forks test/unit/test/retry.test.ts:55 › describe object add(1, 1) › returned value not be greater than 2
⚠️ Ubuntu 26.04 · forks test/unit/test/retry.test.ts:55 › describe object add(1, 1) › returned value not be greater than 2
⚠️ win 10.0.26100 · forks test/unit/test/retry.test.ts:55 › describe object add(1, 1) › returned value not be greater than 2
⚠️ Ubuntu 26.04 · threads test/unit/test/retry.test.ts:55 › describe object add(1, 1) › returned value not be greater than 2
⚠️ win 10.0.26100 · threads test/unit/test/retry.test.ts:55 › describe object add(1, 1) › returned value not be greater than 2
⚠️ Ubuntu 26.04 · vmThreads test/unit/test/retry.test.ts:61 › describe object add(1, 1) › returned value not be less than 2
…and 226 more

View full report

ℹ️ About Flakiness.io in GitHub

Your team has set up Flakiness.io pull request comments. This comment is updated when

  • The first test results arrive for this pull request
  • A later run reports more results for the same commit
  • A new commit is pushed and tested

Flakiness.io rewrites the comment in place, so it always reflects the most recently tested commit.

@sheremet-va
sheremet-va merged commit c6ad97d into main Nov 25, 2026
28 of 30 checks passed
@sheremet-va
sheremet-va deleted the fix/browser-mock-import-urls branch November 25, 2026 08:26
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.

Browser mode: vi.mock of a non-JS module (svg, json, ?query assets) is ignored with import map mocks (5.1.0)

1 participant