always log exec(…) result when using test.only or test.debug
This commit is contained in:
parent
eb7e5e6988
commit
0e3c1a721c
1 changed files with 8 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue