-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Don't include unref'd timers in --detectOpenHandles results #8941
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8941 +/- ##
==========================================
- Coverage 64.23% 64.18% -0.06%
==========================================
Files 276 276
Lines 11700 11712 +12
Branches 2864 2867 +3
==========================================
+ Hits 7516 7517 +1
- Misses 3552 3563 +11
Partials 632 632
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.
Awesome, thanks a lot @pimterry!
I've verified locally that the test fails with collectHandles.ts@master
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.
This is great, thanks for tackling it! I didn't know about hasRef
Now updated with some more general conditional testing logic. I couldn't quite follow the existing pattern ( In Node 10:
In Node 12 the
|
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.
Barring lint (prettier) errors reported by CI, this LGTM. Super awesome contribution, thank you!
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fix #8939
Note that this shouldn't affect any behaviour in Node < 11, and because of that the test is skipped in older versions. It passes happily for me locally with Node 12.9.1 though.
It would be possible to extend this to cover old versions later on (by wrapping
ref()
/unref()
) if that seems worthwhile for somebody.