Prettier output for go test
. Formatting is heavily inspired by (read "stolen from") Jest.
go get -u github.com/jonbretman/gotestpretty
gotestpretty
takes the output of go test
with the -json
flag. For example:
$ go test ./... -v -json | gotestpretty
- Colorized output to make it clear which tests passed and which failed
- Summary line at the end indicating how many passes, failures, and skipped tests there were
- Summary of failed tests at the end with a small code snippet pointing at the line the error occurred
- Subtests are shown clearly under the parent test