"TypeError: Failed to parse URL from [object Request]" with Vitest and Happy DOM #2191
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.20.3
Reproduction repository
https://stackblitz.com/edit/vitest-dev-vitest-d3shef
Reproduction steps
msw
,happy-dom
,jsdom
npm install && npm run test
Current behavior
With MSW enabled, passing a string as a parameter of
fetch()
:TypeError: Failed to parse URL from [object Request]
error occurs withhappy-dom
, but not withnode
orjsdom
.Expected behavior
fetch()
should be able to receive a string regardless of MSW.While it's a bit vague to call it an MSW issue, I would appreciate it if you could provide a workaround if there is one.
The text was updated successfully, but these errors were encountered: