-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)pr welcome
Description
Describe the bug
Expect.soft doesn't seem to be respected when using toMatchSnapshot, and instead of continuing the test it terminates on failed execution.
expect.soft({foo:"bar"}).toMatchObject({foo:"baz"})
// execution continues
expect.soft({ time: new Date() }).toMatchSnapshot()
// execution doesn't continue here
Reproduction
https://github.com/tijmenvanegmond/vitest-expect-soft-snapshota
System Info
System:
OS: macOS 26.0.1
CPU: (8) arm64 Apple M1
Memory: 315.45 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0
npm: 10.9.2
pnpm: 10.0.0
Browsers:
Chrome: 141.0.7390.55
Firefox: 143.0.4
Safari: 26.0.1
npmPackages:
@vitest/ui: 3.2.4 => 3.2.4
vitest: 3.2.4 => 3.2.4Used 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
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)pr welcome