-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Insufficient documentation for migration to 0.31 #3332
Comments
Hello @golergka. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
@sheremet-va this is an issue about documentation, not code. The only steps needed to reproduce is are already explained in the issue:
|
I don't understand the problem that needs documenting. The changes to mocks API were not breaking, you don't need to migrate anything. |
@sheremet-va Then why is it described in the release notes as a breaking change? In my project, some tests are failing after upgrading from v0.30.1 to v0.31.0, so it is a breaking change for me. |
It's breaking if Vitest is used with public API, the usage did not change. If you have any problems, create a reproduction and we will fix it. |
Do you mean it's a change to the API because |
By public API I mean |
Thanks for clarifying. Yes, removing the "Breaking change" in changelogs would solve this issue — right now it looks like it needs migrating. This means my issues are actually a bug with vitest code and not me being stupid. I'll create a separate issue for this. |
I changed the release notes. I also suspect that you might've had the same issue described in #3340 If so, it should be fixed in the next version. Please, feel free to create an issue with reproduction if you have any unexpected changes that were caused with the latest release. |
Describe the bug
I have this mocking code in my codebase:
And this check later on:
In 0.30 version, this check passed, but in 0.31, it does not. I think it's connected to
vi.hoisted
change.Now, I don't think it's a bug in vitest code. However, I think that there's insufficient documentation on the way to properly migrate — so this bug is about documentation quality, not code.
I don't understand how exactly did behaviour of the above code change. I would assume that if
mockedGoogleLogin
didn't exist at hoist time, it should have thrown something trying to access it. And I don't understand exact steps needed to rewrite it for 0.31 — some examples and migration guide would be helpful.Reproduction
System Info
I'm not really smart
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: