-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
Description
Describe the bug
I have specified in the vitest.config.ts a different path for the screenshot directory like so:
resolveScreenshotPath: ({ root, testFileDirectory, screenshotDirectory, arg, browserName, platform, ext }) =>
`${root}/${testFileDirectory}/${screenshotDirectory}/${arg}-${browserName}-${platform}${ext}`,
resolveDiffPath: ({ root, testFileDirectory, screenshotDirectory, arg, browserName, platform, ext }) =>
`${root}/${testFileDirectory}/${screenshotDirectory}/diff/${arg}-${browserName}-${platform}${ext}`,and yet whenever i update my screenshot with the command pnpm vitest run --update, it creates the folder with the test file's name (in this screenshot the file name is button.visual.spec.tsx)
also important to note that as you can see, it doesnt insert any of the files into it, but simply creates it.
Reproduction
i feel like the issue is pretty straight forward... if a reproduction is absolutely necessary ill make one.
System Info
System:
OS: macOS 15.6.1
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 248.60 MB / 16.00 GB
Shell: 5.3.3 - /usr/local/bin/bash
Binaries:
Node: 22.18.0 - ~/.nvm/versions/node/v22.18.0/bin/node
npm: 10.9.3 - ~/.nvm/versions/node/v22.18.0/bin/npm
pnpm: 10.16.1 - ~/.nvm/versions/node/v22.18.0/bin/pnpm
Watchman: 2025.08.25.00 - /usr/local/bin/watchman
Browsers:
Chrome: 140.0.7339.133
Safari: 18.6
npmPackages:
@vitejs/plugin-react: catalog: => 5.0.2
@vitest/browser: ^4.0.0-beta.11 => 4.0.0-beta.11
@vitest/coverage-v8: ^4.0.0-beta.11 => 4.0.0-beta.11
@vitest/ui: ^4.0.0-beta.11 => 4.0.0-beta.11
playwright: ^1.55.0 => 1.55.0
vite: catalog: => 6.3.6
vitest: ^4.0.0-beta.11 => 4.0.0-beta.11
vitest-browser-react: ^2.0.0-beta.3 => 2.0.0-beta.3Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable