-
-
Notifications
You must be signed in to change notification settings - Fork 769
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
[Node v21.7.0] Impossible to stub fetch
#2590
Comments
Thank you for linking up the associated Node issues. Lots of good stuff there, including your own contributions. I think it's wise to hold off for a little while in order to see if this partly resolves itself within Node (my take after reading the discussion). |
Same behaviour in node 20.12.0 (stopped working in this version) |
We can't do much about this until nodejs/node#52275 (created 5 days ago) is merged and then subsequently released and possibly backmerged (into version 20). |
Fix for this landed in Node 22.1.0 (nodejs/node#52768). There is no fix for version 21, but installing the latest version 20 will get you the fix. I have also verified this works in 20.13.1 and 22.2.0, as well as testing that it did not working in 20.12.0 and others. |
Describe the bug
With Node.js v21.7.0, it's no longer possible to stub the
fetch()
function.Edit:
To Reproduce
package.json
testcase.js
Steps to reproduce the behavior:
npm install
node testcase.js
Expected behavior
Context (please complete the following information):
Additional context
It's work with Node.js v21.6.2.
The problem seems to come from Node.js and the pull request nodejs/node#51598 (comment)
The text was updated successfully, but these errors were encountered: