Commit 97fa075
test_runner: support running tests in process
This commit introduces a new --experimental-test-isolation flag
that, when set to 'none', causes the test runner to execute all
tests in the same process. By default, this is the main test
runner process, but if watch mode is enabled, it spawns a separate
process that runs all of the tests.
The default value of the new flag is 'process', which uses the
existing behavior of running each test file in its own child
process.
It is worth noting that when the isolation mode is 'none', globals
and all other top level logic (such as top level before() and after()
hooks) is shared among all files.
Co-authored-by: Moshe Atlow <moshe@atlow.co.il>
PR-URL: #53927
Fixes: #51548
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent 858b583 commit 97fa075Copy full SHA for 97fa075
File tree
Expand file treeCollapse file tree
22 files changed
+746
-206
lines changedOpen diff view settings
Filter options
- doc
- api
- lib/internal
- main
- test_runner
- src
- test
- fixtures/test-runner
- no-isolation
- snapshots
- parallel
Expand file treeCollapse file tree
22 files changed
+746
-206
lines changedOpen diff view settings
Collapse file
+19-2Lines changed: 19 additions & 2 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1081 | 1081 | |
1082 | 1082 | |
1083 | 1083 | |
| 1084 | + |
| 1085 | + |
| 1086 | + |
| 1087 | + |
| 1088 | + |
| 1089 | + |
| 1090 | + |
| 1091 | + |
| 1092 | + |
| 1093 | + |
| 1094 | + |
| 1095 | + |
| 1096 | + |
| 1097 | + |
1084 | 1098 | |
1085 | 1099 | |
1086 | 1100 | |
| ||
2200 | 2214 | |
2201 | 2215 | |
2202 | 2216 | |
2203 | | - |
| 2217 | + |
| 2218 | + |
| 2219 | + |
2204 | 2220 | |
2205 | 2221 | |
2206 | 2222 | |
| ||
2363 | 2379 | |
2364 | 2380 | |
2365 | 2381 | |
2366 | | - |
| 2382 | + |
2367 | 2383 | |
2368 | 2384 | |
2369 | 2385 | |
| ||
3573 | 3589 | |
3574 | 3590 | |
3575 | 3591 | |
| 3592 | + |
3576 | 3593 | |
3577 | 3594 | |
3578 | 3595 | |
Collapse file
+28-12Lines changed: 28 additions & 12 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
445 | 445 | |
446 | 446 | |
447 | 447 | |
448 | | - |
449 | | - |
450 | | - |
451 | | - |
452 | | - |
453 | | - |
| 448 | + |
| 449 | + |
| 450 | + |
| 451 | + |
| 452 | + |
| 453 | + |
454 | 454 | |
455 | 455 | |
456 | 456 | |
457 | 457 | |
458 | 458 | |
459 | 459 | |
| 460 | + |
| 461 | + |
| 462 | + |
| 463 | + |
| 464 | + |
| 465 | + |
| 466 | + |
| 467 | + |
460 | 468 | |
461 | 469 | |
462 | 470 | |
| ||
933 | 941 | |
934 | 942 | |
935 | 943 | |
936 | | - |
| 944 | + |
937 | 945 | |
938 | 946 | |
939 | 947 | |
| ||
1239 | 1247 | |
1240 | 1248 | |
1241 | 1249 | |
| 1250 | + |
| 1251 | + |
| 1252 | + |
1242 | 1253 | |
1243 | 1254 | |
1244 | 1255 | |
| ||
1272 | 1283 | |
1273 | 1284 | |
1274 | 1285 | |
1275 | | - |
1276 | | - |
| 1286 | + |
| 1287 | + |
| 1288 | + |
| 1289 | + |
| 1290 | + |
| 1291 | + |
| 1292 | + |
1277 | 1293 | |
1278 | 1294 | |
1279 | 1295 | |
| ||
1717 | 1733 | |
1718 | 1734 | |
1719 | 1735 | |
1720 | | - |
1721 | | - |
1722 | | - |
| 1736 | + |
| 1737 | + |
| 1738 | + |
1723 | 1739 | |
1724 | 1740 | |
1725 | 1741 | |
|
Collapse file
+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
185 | 185 | |
186 | 186 | |
187 | 187 | |
| 188 | + |
| 189 | + |
| 190 | + |
188 | 191 | |
189 | 192 | |
190 | 193 | |
|
Collapse file
lib/internal/main/test_runner.js
Copy file name to clipboardExpand all lines: lib/internal/main/test_runner.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21 | 21 | |
22 | 22 | |
23 | 23 | |
24 | | - |
| 24 | + |
25 | 25 | |
26 | 26 | |
27 | 27 | |
|
Collapse file
lib/internal/test_runner/harness.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/harness.js+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
334 | 334 | |
335 | 335 | |
336 | 336 | |
| 337 | + |
337 | 338 | |
0 commit comments