Replies: 1 comment 4 replies
-
Hi, @foxaltus. I suspect that setup files aren't applied in the browser. That's still the setup file for your Node.js run of Vitest. @sheremet-va, please correct me if I'm wrong. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying Vitest browser mode (still experimental) and I'm wondering what's the canonical way to setup MSW in this mode? I tried:
with:
While this seems to work, I'm not sure this is 100% correct.
Also, I am not able to override a request in a single test using:
The override doesn't seem to have any effect or to be taken into account.
EDIT: the override works if I move whatever I have inside
vitest-setup.ts
into the test file instead. I'm not quite sure why.Beta Was this translation helpful? Give feedback.
All reactions