Commit 5bbc6d7
assert: remove unreachable code
There is only one entry in `kReadableOperator` that ends in `Unequal`.
So the value assigned on line 392 can only be truthy if `operator` is
`notDeepEqual`. Therefore, the ternary condition on line 394 is always
true. Remove the ternary. Coverage reports confirm that the removed code
is unused.
PR-URL: #27840
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>1 parent 10e0d7f commit 5bbc6d7Copy full SHA for 5bbc6d7
File tree
Expand file treeCollapse file tree
1 file changed
+3
-4
lines changedOpen diff view settings
Filter options
- lib/internal/assert
Expand file treeCollapse file tree
1 file changed
+3
-4
lines changedOpen diff view settings
Collapse file
lib/internal/assert/assertion_error.js
Copy file name to clipboardExpand all lines: lib/internal/assert/assertion_error.js+3-4Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
391 | 391 | |
392 | 392 | |
393 | 393 | |
394 | | - |
395 | | - |
396 | | - |
397 | | - |
| 394 | + |
| 395 | + |
| 396 | + |
398 | 397 | |
399 | 398 | |
400 | 399 | |
|
0 commit comments