Skip to content

Commit 4b706ae

Browse files
committed
test: show output even when a test binary didn't exit cleanly
This was a problem on wasm, where node would exit with a non-zero exit code when there was a panic.
1 parent 1ac26d3 commit 4b706ae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

main_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,9 @@ func runTestWithConfig(name string, t *testing.T, options compileopts.Options, c
429429
for _, line := range strings.Split(strings.TrimRight(w.String(), "\n"), "\n") {
430430
t.Log(line)
431431
}
432+
if stdout.Len() != 0 {
433+
t.Logf("output:\n%s", stdout.String())
434+
}
432435
t.Fail()
433436
return
434437
}

0 commit comments

Comments
 (0)