From 0e3c1a721ca2a5275f2aed3f27d43db54117adb2 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Mon, 28 Oct 2024 18:33:37 +0100 Subject: [PATCH] =?UTF-8?q?always=20log=20`exec(=E2=80=A6)`=20result=20whe?= =?UTF-8?q?n=20using=20`test.only`=20or=20`test.debug`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- integrations/utils.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/integrations/utils.ts b/integrations/utils.ts index 9e11c5a73..9389d638b 100644 --- a/integrations/utils.ts +++ b/integrations/utils.ts @@ -112,8 +112,14 @@ export function test( (error, stdout, stderr) => { if (error) { if (execOptions.ignoreStdErr !== true) console.error(stderr) + if (only || debug) { + console.error(stdout) + } reject(error) } else { + if (only || debug) { + console.log(stdout.toString() + '\n\n' + stderr.toString()) + } resolve(stdout.toString() + '\n\n' + stderr.toString()) } }, @@ -187,14 +193,14 @@ export function test( child.stdout.on('data', (result) => { let content = result.toString() - if (debug) console.log(content) + if (debug || only) console.log(content) combined.push(['stdout', content]) stdoutMessages.push(content) notifyNext(stdoutActors, stdoutMessages) }) child.stderr.on('data', (result) => { let content = result.toString() - if (debug) console.error(content) + if (debug || only) console.error(content) combined.push(['stderr', content]) stderrMessages.push(content) notifyNext(stderrActors, stderrMessages)