undici icon indicating copy to clipboard operation
undici copied to clipboard

fix: set kBodyUsed only once

Open Uzlopak opened this issue 3 months ago • 5 comments

@metcoder95 wdyt? #3294

Uzlopak avatar Sep 27 '25 22:09 Uzlopak

Codecov Report

:x: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 92.94%. Comparing base (7321451) to head (68e70d6). :warning: Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/core/util.js 33.33% 2 Missing :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4592   +/-   ##
=======================================
  Coverage   92.94%   92.94%           
=======================================
  Files         106      106           
  Lines       32973    32970    -3     
=======================================
- Hits        30646    30644    -2     
+ Misses       2327     2326    -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar Sep 27 '25 23:09 codecov-commenter

@metcoder95

There is no code coverage. And i guess we can remove this code, because https://nodejs.org/api/stream.html#readablereadabledidread is existing since v14.

Uzlopak avatar Sep 28 '25 13:09 Uzlopak

Streams will start the stream if on is called with 'data' that's why the EE prototype is used.

ronag avatar Oct 18 '25 18:10 ronag

Ok, but the thing is, that the code is not covered by unit tests.

Uzlopak avatar Oct 18 '25 19:10 Uzlopak

Would be nice to have that fixed.

ronag avatar Oct 19 '25 17:10 ronag