-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
lib,test: enforce use of assert.fail via a lint rule
#61004
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61004 +/- ##
==========================================
+ Coverage 88.51% 88.55% +0.03%
==========================================
Files 703 703
Lines 208522 208522
Branches 40212 40219 +7
==========================================
+ Hits 184564 184647 +83
+ Misses 15957 15905 -52
+ Partials 8001 7970 -31
🚀 New features to boost your workflow:
|
Renegade334
left a comment
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 pattern has actually made its way into lib as well (
node/lib/internal/crypto/cipher.js
Line 100 in 83ba6b1
| assert(false, 'Cannot change encoding'); |
assert.fail via a lint ruleassert.fail via a lint rule
PR-URL: nodejs#61004 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
|
Landed in 79df8b2 |
assert.failcommunicates the intent better thanassert(false)IMO