-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
Following #5890:
toMatchFileSnapshot(EMPTY_FILE) will consistently fail when CI=true.
As pointed out by @hi-ogawa:
Vitest probably got confused by empty snapshot file and tries to create a new snapshot, but that's not allowed on CI environment (i.e. it's treated as error by default).
Reproduction
https://github.com/gterras/repro-vitest-snapshot
npm run test=> OKnpm run test:ci=> KO
System Info
Binaries:
Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
npmPackages:
vitest: ^1.6.0 => 1.6.0Used Package Manager
npm
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)