Replies: 1 comment 1 reply
-
Probably that shouldn't happen, so either Vitest bugs or something specific about your setup. Can you try minimal repro for us to look into? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To provide some initial context, assume that I have this in the end of many tests:
and a
beforeEach
that resets all my mocks.When I run this test from it's directory, it succeeds and all tests passes.
But if I use Vitest workspace (with only this test), the expected number of times these functions should be called does not match.
3 is the number of tests I have on this file. So I'm assuming that the mocks are not being cleared.
What am I doing wrong?
EDIT: I tested clearing the mock right before I called it, and it works, so my assumption was correct
Beta Was this translation helpful? Give feedback.
All reactions