Node17 and Node18: Unable to parse stubbed response bodies from the mws rest.post #1349
Closed
4 tasks done
Labels
bug
Something isn't working
needs:triage
Issues that have not been investigated yet.
scope:node
Related to MSW running in Node
Prerequisites
Environment check
msw
versionNode.js version
v18.6.0 and v17.9.1
Reproduction repository
https://github.com/rosatolen/msw-stub-post-bug-node17-node18
Reproduction steps
All steps are in the readme of the provided repository but they are provided here again:
Current behavior
When stubbing this post request response with msw, the response body causes the production code to hang while parsing it here. On the other hand, if I stub a get request response instead, I do not see the same issue.
Expected behavior
Parsing the response body stubbed by an msw rest.post should not cause my code to hang. The response body provided by the msw rest.post seems to be malformed in some way. The rest.post functionality should match the existing working functionality in rest.get.
The text was updated successfully, but these errors were encountered: