Node.js (Undici) fetch doesn't follow redirects when mocked with MSW #2266
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
22.8.0
Reproduction repository
https://github.com/islazh/msw-redirection-bug-repro
Reproduction steps
Steps to reproduce
nvm use
corepack enable
pnpm install
pnpm test
Current behavior
The requests do not automatically "follow" the redirect and a 302 is returned in the response with Location header. The test fails as a result.
Expected behavior
The requests should "follow" the redirect and progress to /redirected. The response status should be 200 with whatever HTML is returned.
The text was updated successfully, but these errors were encountered: