-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snapshots failing since 3.0.5 #7430
Comments
We got a similar report on discord https://discord.com/channels/917386801235247114/1333757743386984529/1333757743386984529, but I couldn't repro https://stackblitz.com/edit/vitest-dev-vitest-uekoaeam?file=test%2Frepro.test.ts We'll need more details to investigate this further 🙏 |
Hello @ronaldcurtis. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with |
I was able to fix the error, it seems to be connected to monorepos (we're using pnpm v10 workspaces). After upgrading all our packages to 3.0.5, the error seems to go away. I'll try and reproduce on stackblitz |
Right. I was guessing that monorepo with multiple Vitest versions can lead to this cryptic error. We may be able to improve error message, but the reproduction would be still needed. It doesn't have to be on stackblitz and github repo to clone is also welcome. |
Just wanted to note here that I'm running into the same issue after upgrading a project via a Dependabot update from 3.0.4 to 3.0.5. My project is also a monorepo with PNPM v10. We additionally had some weird issues where We ended up reverting the commit from Dependabot to upgrade vitest to 3.0.5. I'm not clear on what was causing the underlying test failures with the "Did you call 'SnapshotClient.setup()'?" error, but in case of our other dependencies seeming to have issues after, I suspect that an underlying vitest:
specifier: ^3.0.4
- version: 3.0.4(@types/[email protected])(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])
+ version: 3.0.5(@types/[email protected])(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]) Note the I would provide a reproduction if I could, but the codebase we ran into this issue on is currently private. Maybe some of this additional context could be helpful to those who come across this issue. |
Describe the bug
After upgrading to 3.0.5 of vitest, all snapshot tests now fail with the following:
Reproduction
Create a simple snapshot test:
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: