Describe the bug
Vitest screenshots assets are not being exposed correctly, and vitest ui is not able to reach them.
When using projects config to run browser tests, vitest ui shows a broken ref image.
Current Behavior:
Expected Behavior:
Reproduction
I've created a minimal reproduction repo:
In this repo in the vitest.config.ts you will see 2 configs:
- The default (uncommented) is the one that fails (
current behavior)
- The commented is the one used for
expected behavior
Steps:
- download the project to be able to use playwright, as stackblitz does not allow it
- npm ci
- run
npm run test
-
- remember to delete reference screenshots between runs or the tests will not fail
System Info
System:
OS: macOS 15.6.1
CPU: (8) arm64 Apple M3
Memory: 334.80 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.11.0 - /[REDACTED]/.nvm/versions/node/v24.11.0/bin/node
npm: 11.6.1 - /[REDACTED]/.nvm/versions/node/v24.11.0/bin/npm
Browsers:
Brave Browser: 141.1.83.120
Safari: 18.6
Used Package Manager
npm
Validations
Describe the bug
Vitest screenshots assets are not being exposed correctly, and vitest ui is not able to reach them.
When using
projectsconfig to run browser tests, vitest ui shows a broken ref image.Current Behavior:
Expected Behavior:
Reproduction
I've created a minimal reproduction repo:
In this repo in the
vitest.config.tsyou will see 2 configs:current behavior)expected behaviorSteps:
npm run testSystem Info
System: OS: macOS 15.6.1 CPU: (8) arm64 Apple M3 Memory: 334.80 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.11.0 - /[REDACTED]/.nvm/versions/node/v24.11.0/bin/node npm: 11.6.1 - /[REDACTED]/.nvm/versions/node/v24.11.0/bin/npm Browsers: Brave Browser: 141.1.83.120 Safari: 18.6Used Package Manager
npm
Validations