-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerpr welcome
Description
Describe the bug
Currently pressing "u" command during browser watch mode is not working.
The issue seems to be that configOverride:
vitest/packages/vitest/src/node/core.ts
Lines 577 to 578 in 70e8a38
| this.configOverride.snapshotOptions = { | |
| updateSnapshot: 'all', |
is not passed to browser client via getConfig API:
vitest/packages/vitest/src/api/setup.ts
Lines 107 to 109 in 70e8a38
| getConfig() { | |
| return vitestOrWorkspace.config | |
| }, |
It looks like other pools are using getSerializableConfig, so I suppose browse pool can do the same?
| const _config = project.getSerializableConfig() |
Reproduction
https://github.com/hi-ogawa/repro-vitest-browser-update-snapshot/
pnpm testto start watch mode- initially test fails with error: 2 (actual) != 1 (snapshot)
- press "u" to update snapshot
- still the same error: 2 (actual) != 1 (snapshot)
It looks like browser mode snapshot is completely stuck on stackblitz but the same code is here:
https://stackblitz.com/edit/vitest-dev-vitest-xqh7sx?file=package.json
System Info
System:
OS: Linux 6.6 Arch Linux
CPU: (12) x64 AMD Ryzen 5 5625U with Radeon Graphics
Memory: 2.06 GB / 14.98 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 18.19.0 - ~/.volta/tools/image/node/18.19.0/bin/node
Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
npm: 10.2.3 - ~/.volta/tools/image/node/18.19.0/bin/npm
pnpm: 8.12.0 - ~/.volta/tools/image/node/18.19.0/bin/pnpm
Browsers:
Chromium: 120.0.6099.129
npmPackages:
@vitest/browser: latest => 1.1.1
vite: latest => 5.0.10
vitest: latest => 1.1.1Used 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
Metadata
Metadata
Assignees
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerpr welcome