The current getResponse example code works only browser due to that the Request constructor generate a URL from the URI like /user.
But it don't act well non-browser environment like node because of it requires URL.
We should show better for both environment.
The current
getResponse
example code works only browser due to that the Request constructor generate a URL from the URI like/user
. But it don't act well non-browser environment like node because of it requires URL. We should show better for both environment.I picked it from here. https://github.com/mswjs/msw/blob/ad8ebac0c6b3c1dd66bf275b8c9d06370607e9c6/src/core/getResponse.test.ts#L41-L44