Replies: 1 comment
-
I believe this has been addressed in the latest releases. @SPH-0gJo, could you please update |
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
-
I was trying to test some handler using fetch() and noticed that when I set the body in the handler with HttpResponse.text() or HttpResponse.json() didn't get any body in response I thought fetch() was the cause and tested fetch() with setupWorker(). response.body is undefined and response.text() in fetch callback only prints "" (empty string) in jest code.
The only thing which is missed was response body. The other response property I had configured like statusText existed well.
I am using
I've created an repository which reproduces this problem
You can find test code in App.test.tsx and msw handler in handler.ts.
So, my question is: Where does the body disappear to and how to preserve it?
Beta Was this translation helpful? Give feedback.
All reactions