-
-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support global fetch in Node.js #1543
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 8921324:
|
@kettanaito Thank you for landing this change! Do you know when we would be able to create a release with it? |
@christianvuerings, MSW releases automatically but thanks for bumping this. Looks like the latest release failed after I've migrated this repo to PNPM (https://github.com/mswjs/msw/actions/runs/4238043336/jobs/7364679319). Will look into that... |
@kettanaito Great, thank you! |
Released: v1.1.0 🎉This has been released in v1.1.0! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
It might be worth noting that this update could require a setup change. In my case, I am mocking a GraphQL API for Apollo Client, and upon updating to msw v1.1.0, I started getting an The fix for me was to add an explicit But it should be noted that this was not required prior to this update (e.g. the code works without this change in v1.0.0). |
I'm experiencing a similar issue to @thisjeremiah; I'm using Node v18 and Cypress to test a Next.js application. Bumping to MSW v1.1.0 has me experiencing the same
|
@anthonyhastings, I believe I have a fix for that issue. Will be published soon. |
Any news on this? I'm still facing the Invalid URL error |
This PR also breaks the following test:
The redirect is not followed, works well in 1.0.1 |
For those who landed here after upgrading to a version above MSW 1.1.0 and the tests stopped working. I wrote the workaround implementation in the comment below, so please refer to it |
fetch
in Node.js 17+.