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
fix: make automocking aware of symbol indexed methods #1119
Conversation
✅ Deploy Preview for vitest-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@antfu could you push a new updated build to i can confirm when installing locally that |
released in |
on both windows and in a clean project directory (even linux) all tests in this PR pass with only a single call to however when running tests in when inspecting the value of in a successful test run, |
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
this PR intends to resolve #1082 by updating automocking to fully support symbol indexed methods (specifically, fixing the root issue which occurs when trying to restore and later use such methods)
caveat
in a fresh project, i can get the below test snippet to fail for
vitest@0.9.0
. i can then get them to pass when linking vitest locally to this branch. however, when running the tests inexamples/mocks
, the below tests fail as the mock is not properly restored.local testing
in a fresh project, the following will fail for
v0.9.0
and pass on this PRin
log.ts
and in
log.test.ts