Skip to content

Commit b498238

Browse files
committed
always log exec(…) result when using test.only or test.debug
1 parent 6914541 commit b498238

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

integrations/utils.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,14 @@ export function test(
112112
(error, stdout, stderr) => {
113113
if (error) {
114114
if (execOptions.ignoreStdErr !== true) console.error(stderr)
115+
if (only || debug) {
116+
console.error(stdout)
117+
}
115118
reject(error)
116119
} else {
120+
if (only || debug) {
121+
console.log(stdout.toString() + '\n\n' + stderr.toString())
122+
}
117123
resolve(stdout.toString() + '\n\n' + stderr.toString())
118124
}
119125
},
@@ -187,14 +193,14 @@ export function test(
187193

188194
child.stdout.on('data', (result) => {
189195
let content = result.toString()
190-
if (debug) console.log(content)
196+
if (debug || only) console.log(content)
191197
combined.push(['stdout', content])
192198
stdoutMessages.push(content)
193199
notifyNext(stdoutActors, stdoutMessages)
194200
})
195201
child.stderr.on('data', (result) => {
196202
let content = result.toString()
197-
if (debug) console.error(content)
203+
if (debug || only) console.error(content)
198204
combined.push(['stderr', content])
199205
stderrMessages.push(content)
200206
notifyNext(stderrActors, stderrMessages)

0 commit comments

Comments
 (0)