Commit 1ee7ce6
committed
assert: limit string inspection when logging assertion errors
This makes sure long strings as `actual` or `expected` values on an
`AssertionError` won't be logged completely. This is important as
the actual value is somewhat redundant in combination with the error
message which already logs the difference between the input values.
PR-URL: #28058
Reviewed-By: Rich Trott <rtrott@gmail.com>1 parent ecb963d commit 1ee7ce6Copy full SHA for 1ee7ce6
File tree
Expand file treeCollapse file tree
1 file changed
+27
-1
lines changedOpen diff view settings
Filter options
- lib/internal/assert
Expand file treeCollapse file tree
1 file changed
+27
-1
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+27-1Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
429 | 429 | |
430 | 430 | |
431 | 431 | |
| 432 | + |
| 433 | + |
| 434 | + |
| 435 | + |
| 436 | + |
| 437 | + |
| 438 | + |
| 439 | + |
| 440 | + |
| 441 | + |
| 442 | + |
| 443 | + |
| 444 | + |
| 445 | + |
| 446 | + |
| 447 | + |
432 | 448 | |
433 | 449 | |
434 | 450 | |
435 | 451 | |
436 | | - |
| 452 | + |
| 453 | + |
| 454 | + |
| 455 | + |
| 456 | + |
| 457 | + |
| 458 | + |
| 459 | + |
| 460 | + |
| 461 | + |
| 462 | + |
437 | 463 | |
438 | 464 | |
439 | 465 | |
|
0 commit comments