-
Notifications
You must be signed in to change notification settings - Fork 119
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
jest-fetch-mock fails in Jest 27 and NodeJS 16 #211
Comments
Did you also upgrade to "node-fetch" 3.x or was this only a change in Jest versions? |
I'm also seeing fetch not being mocked in Jest 27 but Node 14. When I debug and look at Updating from Concerned about this though:
Two versions of node-fetch, one is required by |
|
Hmm, for me it's very different:
Line 17 in 79e79e8
That's with Node Version: |
Is this library still being maintained? |
On node 17 it fails with
Would be nice if this gets resolved as this blocking a lot of people from upgrading |
After upgrading to NodeJS 16 I got some wierd issues in my tests that used jest-fetch-mock.
With this simple test:
If I run with Jest 26:
With Jest 27 I get:
Is this an issue with something I am doing that has changed in Jest or is jest-fetch-mock not working correctly?
It looks like fetch isn't being mocked and is returning an error which is failing the test (I could be wrong).
The code it is testing is quite simple:
The text was updated successfully, but these errors were encountered: