refactor!: remove original impl workaround for Vitest 3#45
Open
mcous wants to merge 1 commit into
Open
Conversation
c738a40 to
02fb156
Compare
Owner
Author
|
Changed my mind on this one, I think the hack is still valuable as long as we support vitest v3 |
Owner
Author
|
I keep flipping back and forth here Keep it
Remove it
ConclusionMy gut says to remove the hack for v1 - it's less code to maintain and removes a source of unintended behavior |
BREAKING CHANGE: When using Vitest v3, the fallback mock implementation will be lost after `mockReset`. This is a bug in Vitest. To resolve, upgrade to Vitest v4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since Vitest v4 has now been released (and Vitest v5 is on the way) this PR removes the workaround
mockResetin Vitest v3 added in #28. The fix moving forward for users is to upgrade to Vitest >= v4BREAKING CHANGE: When using Vitest v3, the mock implementation fallback may not work properly after a
mockReset. Upgrade to Vitest v4 to resolve