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
fix: mock node fetch with options.body
fn
#1464
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1464 +/- ##
==========================================
- Coverage 94.54% 94.51% -0.03%
==========================================
Files 49 49
Lines 4269 4269
==========================================
- Hits 4036 4035 -1
- Misses 233 234 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This would really benefit from having a test, as it's a major use case of undici. Maybe open an issue?
cc @ronag |
@mcollina added a test in a not so terrible way |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Fixes #1447
No tests but I could theoretically add them in (by calling
npm run node:build
and then using that file, but seems pretty hacky).Verify the fix works:
test.mjs:
Output:
The issue of the function being called 3 times is not an issue with this fix (see comment in the issue)
Everything is done in the repo's root directory.