-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(vitest): don't hang when mocking files with cyclic dependencies #4811
fix(vitest): don't hang when mocking files with cyclic dependencies #4811
Conversation
✅ Deploy Preview for fastidious-cascaron-4ded94 canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I did some manual testing locally and this fixes all the cases I had.
Thank you!
Any ideas why |
RPC returned the information correctly. In this particular case we need to import |
Description
Fixes #4373
The problem was that the call stack didn't contain the file that triggered the mock factory execution - in this case
importActual
should behave the same way as a dynamicimport
.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.