Commit 8157a50
committed
assert: print more lines in the error diff
So far consequitive identical lines were collapsed if there were at
least three. Now they are only collapsed from five identical lines on.
This also simplifies the implementation a tiny bit by abstracting some
logic.
PR-URL: #28058
Reviewed-By: Rich Trott <rtrott@gmail.com>1 parent 8217441 commit 8157a50Copy full SHA for 8157a50
File tree
Expand file treeCollapse file tree
4 files changed
+77
-57
lines changedOpen diff view settings
Filter options
- lib/internal/assert
- test
- parallel
- pseudo-tty
Expand file treeCollapse file tree
4 files changed
+77
-57
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+46-38Lines changed: 46 additions & 38 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
122 | 122 | |
123 | 123 | |
124 | 124 | |
125 | | - |
| 125 | + |
126 | 126 | |
127 | 127 | |
128 | 128 | |
| ||
154 | 154 | |
155 | 155 | |
156 | 156 | |
157 | | - |
| 157 | + |
| 158 | + |
| 159 | + |
158 | 160 | |
159 | 161 | |
160 | 162 | |
| ||
169 | 171 | |
170 | 172 | |
171 | 173 | |
| 174 | + |
| 175 | + |
| 176 | + |
| 177 | + |
| 178 | + |
| 179 | + |
| 180 | + |
| 181 | + |
| 182 | + |
172 | 183 | |
173 | | - |
174 | | - |
175 | | - |
176 | | - |
| 184 | + |
| 185 | + |
| 186 | + |
| 187 | + |
177 | 188 | |
178 | | - |
179 | | - |
180 | | - |
181 | | - |
| 189 | + |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
182 | 199 | |
183 | 200 | |
184 | | - |
| 201 | + |
185 | 202 | |
186 | 203 | |
187 | 204 | |
188 | 205 | |
189 | 206 | |
190 | | - |
191 | | - |
192 | | - |
193 | | - |
194 | | - |
195 | | - |
196 | | - |
197 | | - |
198 | | - |
199 | | - |
200 | | - |
201 | | - |
202 | | - |
203 | | - |
204 | | - |
205 | | - |
| 207 | + |
| 208 | + |
| 209 | + |
| 210 | + |
206 | 211 | |
207 | | - |
208 | | - |
209 | | - |
210 | | - |
211 | 212 | |
| 213 | + |
212 | 214 | |
213 | 215 | |
214 | 216 | |
| ||
235 | 237 | |
236 | 238 | |
237 | 239 | |
238 | | - |
239 | | - |
240 | | - |
| 240 | + |
| 241 | + |
| 242 | + |
241 | 243 | |
242 | | - |
243 | | - |
244 | | - |
| 244 | + |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | + |
| 250 | + |
| 251 | + |
| 252 | + |
245 | 253 | |
246 | 254 | |
247 | 255 | |
| ||
264 | 272 | |
265 | 273 | |
266 | 274 | |
267 | | - |
| 275 | + |
268 | 276 | |
269 | 277 | |
270 | 278 | |
|
Collapse file
test/parallel/test-assert-deep.js
Copy file name to clipboardExpand all lines: test/parallel/test-assert-deep.js+22-16Lines changed: 22 additions & 16 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
53 | 53 | |
54 | 54 | |
55 | 55 | |
56 | | - |
| 56 | + |
57 | 57 | |
58 | 58 | |
59 | 59 | |
| ||
66 | 66 | |
67 | 67 | |
68 | 68 | |
69 | | - |
| 69 | + |
70 | 70 | |
71 | | - |
| 71 | + |
| 72 | + |
| 73 | + |
72 | 74 | |
73 | 75 | |
74 | 76 | |
| ||
84 | 86 | |
85 | 87 | |
86 | 88 | |
87 | | - |
| 89 | + |
88 | 90 | |
89 | | - |
| 91 | + |
| 92 | + |
| 93 | + |
90 | 94 | |
91 | 95 | |
92 | 96 | |
| ||
932 | 936 | |
933 | 937 | |
934 | 938 | |
935 | | - |
936 | | - |
937 | | - |
938 | | - |
939 | | - |
940 | | - |
941 | | - |
942 | | - |
943 | | - |
944 | | - |
945 | | - |
| 939 | + |
| 940 | + |
| 941 | + |
| 942 | + |
| 943 | + |
| 944 | + |
| 945 | + |
| 946 | + |
| 947 | + |
| 948 | + |
| 949 | + |
| 950 | + |
| 951 | + |
946 | 952 | |
947 | 953 | |
948 | 954 | |
|
Collapse file
test/parallel/test-assert.js
Copy file name to clipboardExpand all lines: test/parallel/test-assert.js+7-2Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
481 | 481 | |
482 | 482 | |
483 | 483 | |
484 | | - |
| 484 | + |
| 485 | + |
485 | 486 | |
486 | 487 | |
487 | 488 | |
488 | 489 | |
489 | 490 | |
| 491 | + |
490 | 492 | |
491 | 493 | |
492 | 494 | |
| ||
500 | 502 | |
501 | 503 | |
502 | 504 | |
| 505 | + |
503 | 506 | |
504 | 507 | |
505 | 508 | |
506 | 509 | |
| 510 | + |
507 | 511 | |
508 | 512 | |
509 | 513 | |
| ||
520 | 524 | |
521 | 525 | |
522 | 526 | |
| 527 | + |
523 | 528 | |
524 | 529 | |
525 | 530 | |
526 | | - |
| 531 | + |
527 | 532 | |
528 | 533 | |
529 | 534 | |
|
Collapse file
test/pseudo-tty/test-assert-colors.js
Copy file name to clipboardExpand all lines: test/pseudo-tty/test-assert-colors.js+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
9 | 9 | |
10 | 10 | |
11 | 11 | |
12 | | - |
| 12 | + |
13 | 13 | |
14 | 14 | |
15 | 15 | |
| ||
19 | 19 | |
20 | 20 | |
21 | 21 | |
| 22 | + |
22 | 23 | |
23 | 24 | |
24 | 25 | |
|
0 commit comments