-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
test: add coverage for _exceptionWithHostPort #59757
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
base: main
Are you sure you want to change the base?
Conversation
Add test case for util._exceptionWithHostPort function to verify proper error object creation with correct properties and message formatting.
47737f2
to
76ea289
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #59757 +/- ##
==========================================
+ Coverage 89.94% 89.99% +0.04%
==========================================
Files 667 667
Lines 196782 196813 +31
Branches 38416 38425 +9
==========================================
+ Hits 176997 177115 +118
+ Misses 12228 12115 -113
- Partials 7557 7583 +26 🚀 New features to boost your workflow:
|
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.
The method actually seems to be unused as far as I can tell and that is the reason it is not covered by tests. I believe we should in fact just remove the code instead.
Testing internals like this is actually mostly not ideal, especially due to situations like these. It would become even more difficult to detect that code is in fact not used.
Thanks for your feedback. As you said testing dead code isn't ideal. I'll make a new PR to fix the bug and then remove the function as you suggested.
Let me know what you think of this plan. If it sounds good, I'll make a new PR for it. |
Add test case for
util._exceptionWithHostPort
function to verify proper error object creation with correct properties and message formatting.Before this PR
After this PR