plugin MSW isn't working with vitest #1870
Replies: 1 comment
-
|
@HelenaVeltri This has something to do with your Node version. MSW v2+ relies on the Web Fetch API, which internally uses TransformStream when mocking or following redirects. Vitest runs by default in a Node-like environment, and: You can add the following prefill to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to config MSW into my project, i created the base files with the handlers, and modified the "vitest.config.ts" and the setup file for it, adding the server
into the setupTest config:
but, when i run my test with the server import return this error:
i tried running in the jsdom and node enviroment and still doesn't working :(
Someone have/had this same problem before?
Beta Was this translation helpful? Give feedback.
All reactions