You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm sorry @mysteryven but I have already opened a PR for this. I probably should have commented before doing so, but it is my first contribution and I didn't want to make any promises that I might not be able to keep 😅.
Clear and concise description of the problem
Jest added mockFn.withImplementation API in v29.1.0
It accepts a function which should be temporarily used as the implementation of the mock while the callback is being executed.
Suggested solution
Add this API to vitest, if maintainers think it would be helpful to it's users.
Alternative
Document how
mockImplementation
ormockImplementationOnce
can be used in these use casesAdditional context
This issue was noticed while writing vitest-codemod tests for mock API
trivikr/vitest-codemod#80
Validations
The text was updated successfully, but these errors were encountered: