Commit dfe529b
test_runner: better handle async bootstrap errors
The test runner is bootstrapped synchronously, with the exception
of importing custom reporters. To better handle asynchronously
throw errors, this commit introduces an internal error type that
can be checked for from the test runner's uncaughtException
handler.
After #46707 and this change
land, the other throw statement in the uncaughtException handler
can be removed. This will allow the test runner to handle errors
thrown from outside of tests (which currently prevents the test
runner from reporting results).
PR-URL: #46720
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>1 parent 93e91f3 commit dfe529bCopy full SHA for dfe529b
File tree
Expand file treeCollapse file tree
4 files changed
+34
-7
lines changedOpen diff view settings
Filter options
- lib/internal
- test_runner
- test/parallel
Expand file treeCollapse file tree
4 files changed
+34
-7
lines changedOpen diff view settings
Collapse file
+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1604 | 1604 | |
1605 | 1605 | |
1606 | 1606 | |
1607 | | - |
1608 | | - |
| 1607 | + |
| 1608 | + |
1609 | 1609 | |
1610 | 1610 | |
1611 | 1611 | |
|
Collapse file
lib/internal/test_runner/harness.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/harness.js+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
18 | 18 | |
19 | 19 | |
20 | 20 | |
| 21 | + |
21 | 22 | |
22 | 23 | |
23 | 24 | |
| ||
32 | 33 | |
33 | 34 | |
34 | 35 | |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
35 | 43 | |
36 | 44 | |
37 | 45 | |
|
Collapse file
lib/internal/test_runner/utils.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/utils.js+12-5Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
7 | 7 | |
8 | 8 | |
9 | 9 | |
| 10 | + |
10 | 11 | |
11 | 12 | |
12 | 13 | |
| ||
23 | 24 | |
24 | 25 | |
25 | 26 | |
| 27 | + |
26 | 28 | |
27 | 29 | |
28 | 30 | |
| ||
149 | 151 | |
150 | 152 | |
151 | 153 | |
152 | | - |
153 | | - |
154 | | - |
155 | | - |
156 | | - |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
157 | 163 | |
158 | 164 | |
159 | 165 | |
| ||
219 | 225 | |
220 | 226 | |
221 | 227 | |
| 228 | + |
222 | 229 | |
223 | 230 | |
224 | 231 | |
Collapse file
test/parallel/test-runner-reporters.js
Copy file name to clipboardExpand all lines: test/parallel/test-runner-reporters.js+12Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
114 | 114 | |
115 | 115 | |
116 | 116 | |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
117 | 129 | |
0 commit comments