undici icon indicating copy to clipboard operation
undici copied to clipboard

feat: port diagnostic-channel tests to node test runner

Open ilteoood opened this issue 2 years ago • 5 comments

This relates to...

#2267

Rationale

Port diagnostic-channel tests to node test runner

Changes

Remove tap and use node test runner for the diagnostic-channel suite

Features

N/A

Bug Fixes

N/A

Breaking Changes and Deprecations

None

Status

  • [X] I have read and agreed to the Developer's Certificate of Origin
  • [X] Tested
  • [S] Benchmarked (optional)
  • [S] Documented
  • [X] Review ready
  • [ ] In review
  • [ ] Merge ready

ilteoood avatar Dec 29 '23 12:12 ilteoood

Codecov Report

Attention: 156 lines in your changes are missing coverage. Please review.

Comparison is base (e39a632) 85.54% compared to head (2d02e90) 84.68%. Report is 180 commits behind head on main.

Files Patch % Lines
lib/fetch/index.js 67.29% 52 Missing :warning:
lib/fetch/util.js 34.66% 49 Missing :warning:
lib/handler/RetryHandler.js 74.35% 30 Missing :warning:
lib/api/readable.js 88.88% 5 Missing :warning:
lib/fetch/headers.js 90.19% 5 Missing :warning:
lib/client.js 93.44% 4 Missing :warning:
lib/compat/dispatcher-weakref.js 42.85% 4 Missing :warning:
lib/core/util.js 95.55% 2 Missing :warning:
lib/fetch/request.js 92.00% 2 Missing :warning:
lib/core/request.js 98.21% 1 Missing :warning:
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2559      +/-   ##
==========================================
- Coverage   85.54%   84.68%   -0.87%     
==========================================
  Files          76       80       +4     
  Lines        6858     7240     +382     
==========================================
+ Hits         5867     6131     +264     
- Misses        991     1109     +118     

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

codecov-commenter avatar Dec 29 '23 12:12 codecov-commenter

@mcollina I've refactored a bit the tests in order to not rely anymore on plan, preserving its nature. Let me know if I still need to use it.

ilteoood avatar Dec 29 '23 13:12 ilteoood

They are needed, because if no events are emitted, the tests will not fail.

mcollina avatar Dec 29 '23 13:12 mcollina

They are needed, because if no events are emitted, the tests will not fail.

If no events are emitted, the promise will never resolve so the test will go in timeout and then fail. But got it, give me 10 minutes and I'll restore it

teobmg avatar Dec 29 '23 13:12 teobmg

They are needed, because if no events are emitted, the tests will not fail.

and now it's there!

teobmg avatar Dec 29 '23 13:12 teobmg