Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 530 Bytes

README.md

File metadata and controls

5 lines (3 loc) · 530 Bytes

Vitest Browser + MSW

Mock Service Worker usage example with Vitest in browser mode.

When the vitest environment is setup with ANY vi.mock calls, it appears to disrupt the expected functionality of the worker, leading to intercepted calls not being properly mocked. Notice how the downloadData method will fail with [ERROR] 18:46.980 xhr-http-handler - Network Error when the vi.mock call is present, but will work as expected when it is removed.