Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
tools: add lint rule to ensure assertions are reached#60125
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
aduh95 commented Oct 5, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
codecovbot commented Oct 5, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #60125 +/- ## ========================================== - Coverage 88.53% 88.52% -0.02% ========================================== Files 703 703 Lines 207833 207825 -8 Branches 40011 40001 -10 ========================================== - Hits 184009 183974 -35 - Misses 15824 15858 +34 + Partials 8000 7993 -7 🚀 New features to boost your workflow:
|
nodejs-github-bot commented Oct 6, 2025
nodejs-github-bot commented Oct 6, 2025
Uh oh!
There was an error while loading. Please reload this page.
ec26b1c into nodejs:mainUh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Oct 7, 2025
Landed in ec26b1c |
PR-URL: #60125 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
Test assertions that are unreachable are pretty much useless, and it’s not always obvious whether a callback is actually executed. By adding a lint rule that forbids writing assertions in callbacks that are not wrapped with
common.mustCall, we should end up with more robust tests.This is only targeting a few test subdirs, the end goal would be to target more in follow up PRs and eventually the entire
test/dir.ESlint failures in
test/parallel