Uh oh!
There was an error while loading. Please reload this page.
test_runner: delegate stderr and stdout formatting to reporter - #48045
Conversation
nodejs-github-bot
commented
May 17, 2023
Review requested:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
as you have mentioned, nesting is redundant here.
also, I think we should stop breaking this into lines and delegate that to the TAP reporter (and leave as is in spec reporter) - but that dosnt have to happen in this PR
There was a problem hiding this comment.
I think we should stop breaking this into lines and delegate that to the TAP reporter (and leave as is in spec reporter)
Sorry I don't get the spec reporter part. By "leaving as it is" are you referring to printing \n as \\n?
There was a problem hiding this comment.
Sorry I don't get the spec reporter part. By "leaving as it is" are you referring to printing \n as \n?
I was referring to the output being split into lines before passing it to the reporter:
https://github.com/nodejs/node/blob/3473edc0bec636d7aa8a39c1df464feab0c2f72d/lib/internal/test_runner/runner.js#L283
but as written, it is also ok to not include it in this PR
There was a problem hiding this comment.
I'll address it in separate PR 👍
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
HinataKah0
commented
May 19, 2023
6e503ca to
3473edcCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
MoLow
commented
May 19, 2023
I think TAP should stay the same as today, and spec should just pipe the original data. that is the goal |
3473edc to
16f1020CompareIntroduce 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`
16f1020 to
67f3543Compare| ### Event: `'test:stderr'` | ||
| * `data` {Object} | ||
| * `file` {string} The path of the test file. |
There was a problem hiding this comment.
For the test:diagnostic event, this can also be undefined. Is that possible for these new events?
There was a problem hiding this comment.
no. test:diagnostic can be produced inside the REPL. these new events are only useful with --test
nodejs-github-bot
commented
May 22, 2023
nodejs-github-bot
commented
May 23, 2023
nodejs-github-bot
commented
May 23, 2023
Landed in 1229a22 |
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: #48045Fixes: #48011 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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: #48045Fixes: #48011 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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: nodejs#48045Fixes: nodejs#48011 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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: nodejs#48045Fixes: nodejs#48011 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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: nodejs#48045Fixes: nodejs#48011 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

Introduce new
TestsStreameventstest:stderrandtest:stdoutto delegate
stderrandstdout(e.g.console.log()) formattingto the reporter. And patch existing reporters to:
test:diagnosticFixes: #48011