Jeff Lau
Jeff Lau
What does your project and setup look like?
Do you have a simple setup on how to replicate?
Did you manage to fix this? I finally had some time recently to look through the example. I'm a bit confused why it's going into the `.then` when it should...
Did you try adding a stream in the body parameter? We use the Response object so I assume you should be able to add a stream. https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Parameters
Sorry for the late responses. I originally wrote the package with only the browser in mind and since most people use babel, I didn't think it would be an issue....
Would this help you to do what you'd like it to do? https://github.com/jefflau/jest-fetch-mock/pull/112
Hey @ivan-kleshnin currently there isn't a way to do this, but this seems like an interesting topic to explore.
I think what @Magnielcz makes sense. Internally jest fetch mock uses the Response object which automatically sets the ok property.
Have you tried mocking your fetch calls that use POST or PUT? it just mocks out the fetch function call completely, so you could return whatever your POST or PUT...
Have you guys got a repo that i can look at?