-
-
Notifications
You must be signed in to change notification settings - Fork 34k
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61004 +/- ##
==========================================
- Coverage 92.23% 88.52% -3.72%
==========================================
Files 343 703 +360
Lines 139073 208432 +69359
Branches 22251 40204 +17953
==========================================
+ Hits 128277 184518 +56241
- Misses 10569 15938 +5369
- Partials 227 7976 +7749
🚀 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
assert.failcommunicates the intent better thanassert(false)IMO