jefflau/jest-fetch-mock

Compatibility with node-fetch 2.6.1

Opened this issue · 4 comments

After updating node-fetch to 2.6.1, it seems that mocks are no longer working.

Here's the diff that I think is causing the issue: node-fetch/node-fetch@v2.6.0...v2.6.1

I think @ldiqual is referring to these lines: https://github.com/node-fetch/node-fetch/compare/v2.6.0...v2.6.1#diff-de1a5a7de991855714cdf433e9f8be96R19-R21

Putting in a code block because Github strips the hash from links 🤷‍♂️

I have tried https://classic.yarnpkg.com/en/docs/selective-version-resolutions/

Screenshot 2021-01-29 at 15 12 05

All the tests were passing which includes mocking fetch

Screenshot 2021-01-29 at 15 14 39

Ah, that works! Thank you @p10ns11y!

I think @ldiqual is referring to these lines: https://github.com/node-fetch/node-fetch/compare/v2.6.0...v2.6.1#diff-de1a5a7de991855714cdf433e9f8be96R19-R21

Putting in a code block because Github strips the hash from links 🤷‍♂️

I'm unsure how any of those changes could have broken jest-fetch-mock. Do you have anything specific you're thinking? Also can you please share the actual error that's occurring or the problem you're facing?