Commit bf3967f
test_runner: simplify hook running logic
This commit removes some asynchronous logic from the runHook()
method and replaces ArrayPrototypeReduce() with a for loop.
PR-URL: #55963
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>1 parent 1a78bde commit bf3967fCopy full SHA for bf3967f
File tree
Expand file treeCollapse file tree
5 files changed
+21
-25
lines changedOpen diff view settings
Filter options
- lib/internal/test_runner
- test/fixtures/test-runner/output
Expand file treeCollapse file tree
5 files changed
+21
-25
lines changedOpen diff view settings
Collapse file
lib/internal/test_runner/test.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/test.js+4-4Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
6 | 5 | |
7 | 6 | |
8 | 7 | |
| ||
846 | 845 | |
847 | 846 | |
848 | 847 | |
849 | | - |
850 | | - |
| 848 | + |
| 849 | + |
| 850 | + |
851 | 851 | |
852 | 852 | |
853 | 853 | |
854 | 854 | |
855 | | - |
| 855 | + |
856 | 856 | |
857 | 857 | |
858 | 858 | |
|
Collapse file
test/fixtures/test-runner/output/abort_hooks.snapshot
Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/abort_hooks.snapshot+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
101 | 101 | |
102 | 102 | |
103 | 103 | |
104 | | - |
| 104 | + |
105 | 105 | |
106 | 106 | |
107 | 107 | |
| ||
122 | 122 | |
123 | 123 | |
124 | 124 | |
125 | | - |
| 125 | + |
126 | 126 | |
127 | 127 | |
128 | 128 | |
|
Collapse file
test/fixtures/test-runner/output/global_after_should_fail_the_test.snapshot
Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/global_after_should_fail_the_test.snapshot-1Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21 | 21 | |
22 | 22 | |
23 | 23 | |
24 | | - |
25 | 24 | |
26 | 25 | |
27 | 26 | |
|
Collapse file
test/fixtures/test-runner/output/hooks.snapshot
Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/hooks.snapshot+5-6Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
77 | 77 | |
78 | 78 | |
79 | 79 | |
80 | | - |
81 | 80 | |
82 | 81 | |
83 | 82 | |
| ||
97 | 96 | |
98 | 97 | |
99 | 98 | |
100 | | - |
101 | 99 | |
102 | 100 | |
103 | 101 | |
| ||
129 | 127 | |
130 | 128 | |
131 | 129 | |
| 130 | + |
132 | 131 | |
133 | 132 | |
134 | 133 | |
| ||
149 | 148 | |
150 | 149 | |
151 | 150 | |
| 151 | + |
152 | 152 | |
153 | 153 | |
154 | 154 | |
| ||
167 | 167 | |
168 | 168 | |
169 | 169 | |
170 | | - |
171 | 170 | |
172 | 171 | |
| 172 | + |
173 | 173 | |
174 | 174 | |
175 | 175 | |
| ||
188 | 188 | |
189 | 189 | |
190 | 190 | |
| 191 | + |
| 192 | + |
191 | 193 | |
192 | 194 | |
193 | 195 | |
| ||
482 | 484 | |
483 | 485 | |
484 | 486 | |
485 | | - |
486 | 487 | |
487 | 488 | |
488 | 489 | |
| ||
502 | 503 | |
503 | 504 | |
504 | 505 | |
505 | | - |
506 | 506 | |
507 | 507 | |
508 | 508 | |
| ||
765 | 765 | |
766 | 766 | |
767 | 767 | |
768 | | - |
769 | 768 | |
770 | 769 | |
771 | 770 | |
|
Collapse file
test/fixtures/test-runner/output/hooks_spec_reporter.snapshot
Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/hooks_spec_reporter.snapshot+10-12Lines changed: 10 additions & 12 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
26 | 26 | |
27 | 27 | |
28 | 28 | |
29 | | - |
30 | 29 | |
31 | 30 | |
32 | 31 | |
| ||
38 | 37 | |
39 | 38 | |
40 | 39 | |
41 | | - |
42 | 40 | |
43 | 41 | |
44 | 42 | |
| ||
55 | 53 | |
56 | 54 | |
57 | 55 | |
| 56 | + |
58 | 57 | |
59 | 58 | |
60 | 59 | |
| ||
67 | 66 | |
68 | 67 | |
69 | 68 | |
| 69 | + |
70 | 70 | |
71 | 71 | |
72 | 72 | |
| ||
78 | 78 | |
79 | 79 | |
80 | 80 | |
81 | | - |
82 | 81 | |
83 | 82 | |
| 83 | + |
84 | 84 | |
85 | 85 | |
86 | 86 | |
| ||
92 | 92 | |
93 | 93 | |
94 | 94 | |
| 95 | + |
| 96 | + |
95 | 97 | |
96 | 98 | |
97 | 99 | |
| ||
242 | 244 | |
243 | 245 | |
244 | 246 | |
245 | | - |
246 | 247 | |
247 | 248 | |
248 | 249 | |
| ||
255 | 256 | |
256 | 257 | |
257 | 258 | |
258 | | - |
259 | 259 | |
260 | 260 | |
261 | 261 | |
| ||
390 | 390 | |
391 | 391 | |
392 | 392 | |
393 | | - |
394 | 393 | |
395 | 394 | |
396 | 395 | |
| ||
430 | 429 | |
431 | 430 | |
432 | 431 | |
433 | | - |
434 | 432 | |
435 | 433 | |
436 | 434 | |
| ||
443 | 441 | |
444 | 442 | |
445 | 443 | |
446 | | - |
447 | 444 | |
448 | 445 | |
449 | 446 | |
| ||
457 | 454 | |
458 | 455 | |
459 | 456 | |
| 457 | + |
460 | 458 | |
461 | 459 | |
462 | 460 | |
| ||
470 | 468 | |
471 | 469 | |
472 | 470 | |
| 471 | + |
473 | 472 | |
474 | 473 | |
475 | 474 | |
| ||
481 | 480 | |
482 | 481 | |
483 | 482 | |
484 | | - |
485 | 483 | |
486 | 484 | |
| 485 | + |
487 | 486 | |
488 | 487 | |
489 | 488 | |
| ||
496 | 495 | |
497 | 496 | |
498 | 497 | |
| 498 | + |
| 499 | + |
499 | 500 | |
500 | 501 | |
501 | 502 | |
| ||
633 | 634 | |
634 | 635 | |
635 | 636 | |
636 | | - |
637 | 637 | |
638 | 638 | |
639 | 639 | |
| ||
647 | 647 | |
648 | 648 | |
649 | 649 | |
650 | | - |
651 | 650 | |
652 | 651 | |
653 | 652 | |
| ||
776 | 775 | |
777 | 776 | |
778 | 777 | |
779 | | - |
0 commit comments