Commit b18a78c
test_runner: delegate stderr and stdout formatting to reporter
Introduce new `TestsStream` events `test:stderr` and `test:stdout`
to delegate `stderr` and `stdout` (e.g. `console.log()`) formatting
to the reporter. And patch existing reporters to:
- Spec: output the message as it is
- TAP: stay the same with existing `test:diagnostic`
PR-URL: #48045
Fixes: #48011
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent e0d0b19 commit b18a78cCopy full SHA for b18a78c
File tree
Expand file treeCollapse file tree
5 files changed
+37
-7
lines changedOpen diff view settings
Filter options
- doc/api
- lib/internal/test_runner
- reporter
Expand file treeCollapse file tree
5 files changed
+37
-7
lines changedOpen diff view settings
Collapse file
+18Lines changed: 18 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1454 | 1454 | |
1455 | 1455 | |
1456 | 1456 | |
| 1457 | + |
| 1458 | + |
| 1459 | + |
| 1460 | + |
| 1461 | + |
| 1462 | + |
| 1463 | + |
| 1464 | + |
| 1465 | + |
| 1466 | + |
| 1467 | + |
| 1468 | + |
| 1469 | + |
| 1470 | + |
| 1471 | + |
| 1472 | + |
| 1473 | + |
| 1474 | + |
1457 | 1475 | |
1458 | 1476 | |
1459 | 1477 | |
|
Collapse file
lib/internal/test_runner/reporter/spec.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/reporter/spec.js+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
117 | 117 | |
118 | 118 | |
119 | 119 | |
| 120 | + |
| 121 | + |
| 122 | + |
120 | 123 | |
121 | 124 | |
122 | 125 | |
|
Collapse file
lib/internal/test_runner/reporter/tap.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/reporter/tap.js+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
45 | 45 | |
46 | 46 | |
47 | 47 | |
| 48 | + |
| 49 | + |
48 | 50 | |
49 | 51 | |
50 | 52 | |
|
Collapse file
lib/internal/test_runner/runner.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/runner.js+6-7Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
284 | 284 | |
285 | 285 | |
286 | 286 | |
287 | | - |
288 | | - |
| 287 | + |
| 288 | + |
289 | 289 | |
290 | 290 | |
291 | 291 | |
| ||
356 | 356 | |
357 | 357 | |
358 | 358 | |
359 | | - |
360 | | - |
361 | | - |
| 359 | + |
| 360 | + |
362 | 361 | |
363 | 362 | |
364 | | - |
365 | | - |
| 363 | + |
| 364 | + |
366 | 365 | |
367 | 366 | |
368 | 367 | |
|
Collapse file
lib/internal/test_runner/tests_stream.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/tests_stream.js+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
57 | 57 | |
58 | 58 | |
59 | 59 | |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
60 | 68 | |
61 | 69 | |
62 | 70 | |
|
0 commit comments