I encountered some problems using the spyOn method. #6230
-
The testA function and testB function are exported from a single file. I use vitest test testA function, expect testB function to have been called. But the assertion is failing. this is demo https://stackblitz.com/edit/vitejs-vite-2uqszv please help me~ thanks |
Beta Was this translation helpful? Give feedback.
Answered by
AriPerkkio
Jul 27, 2024
Replies: 1 comment 1 reply
-
See https://vitest.dev/guide/mocking.html#mocking-pitfalls. Also your reproduction doesn't have Vitest installed or any test cases 🤷 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
EdivenH
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://vitest.dev/guide/mocking.html#mocking-pitfalls.
Also your reproduction doesn't have Vitest installed or any test cases 🤷