mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
test_runner: remove stdout and stderr from error
The CLI test runner parses the TAP output from child processes now and displays it. This commit removes a previous workaround for displaying child process stdout and stderr when tests failures occurred. PR-URL: https://github.com/nodejs/node/pull/45592 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
This commit is contained in:
1 parent
a01dbf179e
commit
fec0fbc333
1 file changed
+1
-8
@@ -234,7 +234,6 @@ function runTestFile(path, root, inspectPort, filesWatcher) {
|
||||
runningProcesses.set(path, child);
|
||||
|
||||
let err;
|
||||
let stderr = '';
|
||||
|
||||
filesWatcher?.watchChildProcessModules(child, path);
|
||||
|
||||
@@ -242,10 +241,6 @@ function runTestFile(path, root, inspectPort, filesWatcher) {
|
||||
err = error;
|
||||
});
|
||||
|
||||
child.stderr.on('data', (data) => {
|
||||
stderr += data;
|
||||
});
|
||||
|
||||
if (isUsingInspector()) {
|
||||
const rl = createInterface({ input: child.stderr });
|
||||
rl.on('line', (line) => {
|
||||
@@ -266,7 +261,7 @@ function runTestFile(path, root, inspectPort, filesWatcher) {
|
||||
subtest.addToReport(ast);
|
||||
});
|
||||
|
||||
const { 0: { 0: code, 1: signal }, 1: stdout } = await SafePromiseAll([
|
||||
const { 0: { 0: code, 1: signal } } = await SafePromiseAll([
|
||||
once(child, 'exit', { signal: t.signal }),
|
||||
child.stdout.toArray({ signal: t.signal }),
|
||||
]);
|
||||
@@ -279,8 +274,6 @@ function runTestFile(path, root, inspectPort, filesWatcher) {
|
||||
__proto__: null,
|
||||
exitCode: code,
|
||||
signal: signal,
|
||||
stdout: ArrayPrototypeJoin(stdout, ''),
|
||||
stderr,
|
||||
// The stack will not be useful since the failures came from tests
|
||||
// in a child process.
|
||||
stack: undefined,
|
||||
|
||||
Reference in new issue
Block a user