Alex Trukhan
Alex Trukhan
@pedegago https://gist.github.com/cathyxz/73739c1bdea7d7011abb236541dc9aaa there is some info. think it wont be fixed, or maybe I've missed something
I have the same issue with the following error. > Invariant Violation: [MSW] Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead. looks like...
after doing everything that @dmitriy-kudelko mentioned in the description and https://jestjs.io/docs/configuration#testenvironmentoptions-object after adding the following to my jest config that is used to run storybook based tests, everything work correctly...
@kodai3 I have `onUnhandledRequest` configured to bypass unhandled requests
but I have another issues now. looks like response is not returned from my mocked request.
also had error inside `HttpResponse.json()` in my msw handlers. the following `jest.polyfills.js` helped. added: `const { ReadableStream } = require("node:stream/web");` and ` ReadableStream: { value: ReadableStream },` ``` // jest.polyfills.js...
@yannbf after update to v2.0.2 and removal of the following code from config ``` testEnvironmentOptions: { customExportConditions: ["node", "node-addons"], }, ``` I still get the following error: `Invariant Violation: [MSW]...