-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Description
gotestsum is hiding the output when the test code cannot be built, which can make debugging harder.
For example:
package main
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
)
//go:embed toto.txt
var toto string
func TestHello(t *testing.T) {
fmt.Println("Hello, World!")
require.True(t, true)
}
Cannot be built because embed is not imported properly. If you try to run that test with go test -v you will get:
# testgo [testgo.test]
./main_test.go:10:3: go:embed only allowed in Go files that import "embed"
FAIL testgo [build failed]
with gotestsum --format standard-verbose:
FAIL testgo [build failed]
=== Failed
=== FAIL: . (0.00s)
FAIL testgo [build failed]
DONE 0 tests, 1 failure in 0.348s
Which is hard to debug. Would be nice to have a flag that allows us to have build error displayed, and not only [build failed]
hush-hush, chouetz, jszwedko, ajgajg1134 and panadeluxe
Metadata
Metadata
Assignees
Labels
No labels