The next-dev-server restores the fetch to the original implementation here. This affects tools, such as MSW, that need to be able to patch fetch to mock the API for tests. See https://github.com/mswjs/msw/issues/1644 for more details.
Expected Behavior
The next dev fetch behavior doesn't interfere with tests.
Which browser are you using? (if relevant)
n/a
How are you deploying your application? (if relevant)
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
Link to the code that reproduces this issue or a replay of the bug
https://github.com/mswjs/msw/issues/1644
To Reproduce
https://github.com/mswjs/msw/issues/1644
Describe the Bug
The next-dev-server restores the
fetch
to the original implementation here. This affects tools, such as MSW, that need to be able to patchfetch
to mock the API for tests. See https://github.com/mswjs/msw/issues/1644 for more details.Expected Behavior
The
next dev
fetch behavior doesn't interfere with tests.Which browser are you using? (if relevant)
n/a
How are you deploying your application? (if relevant)
n/a