Commit 6346bdc
committed
test_runner: run global after() hook earlier
This commit moves the global after() hook execution from the
'beforeExit' event to the point where all tests have finished
running. This gives the global after() a chance to clean up
handles that would otherwise prevent the 'beforeExit' event
from being emitted.
PR-URL: #49059
Fixes: #49056
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>1 parent 4e61c22 commit 6346bdcCopy full SHA for 6346bdc
File tree
Expand file treeCollapse file tree
7 files changed
+104
-9
lines changedOpen diff view settings
Filter options
- lib/internal/test_runner
- test
- fixtures/test-runner/output
- parallel
Expand file treeCollapse file tree
7 files changed
+104
-9
lines changedOpen diff view settings
Collapse file
lib/internal/test_runner/harness.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/harness.js+4-4Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
142 | 142 | |
143 | 143 | |
144 | 144 | |
145 | | - |
146 | | - |
| 145 | + |
| 146 | + |
147 | 147 | |
148 | 148 | |
149 | 149 | |
| ||
152 | 152 | |
153 | 153 | |
154 | 154 | |
155 | | - |
156 | | - |
| 155 | + |
| 156 | + |
157 | 157 | |
158 | 158 | |
159 | 159 | |
|
Collapse file
lib/internal/test_runner/test.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/test.js+23-4Lines changed: 23 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
574 | 574 | |
575 | 575 | |
576 | 576 | |
577 | | - |
| 577 | + |
578 | 578 | |
579 | 579 | |
580 | 580 | |
| ||
662 | 662 | |
663 | 663 | |
664 | 664 | |
665 | | - |
666 | | - |
667 | | - |
| 665 | + |
| 666 | + |
| 667 | + |
| 668 | + |
| 669 | + |
| 670 | + |
| 671 | + |
| 672 | + |
| 673 | + |
| 674 | + |
668 | 675 | |
669 | 676 | |
670 | 677 | |
| ||
706 | 713 | |
707 | 714 | |
708 | 715 | |
| 716 | + |
| 717 | + |
| 718 | + |
| 719 | + |
| 720 | + |
| 721 | + |
| 722 | + |
| 723 | + |
| 724 | + |
| 725 | + |
| 726 | + |
| 727 | + |
709 | 728 | |
710 | 729 | |
711 | 730 | |
|
Collapse file
test/fixtures/test-runner/output/async-test-scheduling.mjs
Copy file name to clipboard+13Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
Collapse file
test/fixtures/test-runner/output/async-test-scheduling.snapshot
Copy file name to clipboard+37Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
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 |
|---|---|---|
| ||
22 | 22 | |
23 | 23 | |
24 | 24 | |
25 | | - |
26 | 25 | |
27 | 26 | |
28 | 27 | |
|
Collapse file
test/parallel/test-runner-output.mjs
Copy file name to clipboardExpand all lines: test/parallel/test-runner-output.mjs+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
74 | 74 | |
75 | 75 | |
76 | 76 | |
| 77 | + |
77 | 78 | |
78 | 79 | |
79 | 80 | |
|
Collapse file
test/parallel/test-runner-root-after-with-refed-handles.js
Copy file name to clipboard+26Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
0 commit comments