gotestyourself / gotestyourself/gotestsum
gotestsum reports nonexistent errors
- Dominant language
- Go
- Stars
- 2.7k
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
Here is the situation: tests succeed with `go test`, both on their own and in the embedded `go test -json` command for `gotestsum`, but when `gotestsum` is done, it reports one error where none exists; and what's more it returns with status 0.
```shell
# Testing with gotestsum
./bin/gotestsum -f standard-verbose -- -v -count=1 -race ./somepackage
# github.com/someorg/somepackage/some.test
=== RUN TestFoo
=== RUN TestFoo/bar
--- PASS: TestFoo (0.00s)
--- PASS: TestFoo/bar (0.00s)
PASS
ok github.com/someorg/somepackage 2.586s
=== Errors
DONE 2 tests, 1 error in 4.981s
$ echo $?
0
# Testing with go test
$ go test -v -count=1 -race ./somepackage
# github.com/someorg/somepackage/some.test
=== RUN TestFoo
=== RUN TestFoo/bar
--- PASS: TestFoo (0.00s)
--- PASS: TestFoo/bar (0.00s)
PASS
ok github.com/someorg/somepackage 1.636s
$ echo $?
0
```
Tested on
- macOS Sonoma, Apple Silicon.
- Both with go 1.22.6 and 1.23.0.
- gotestsum version `dev`
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the report with gotestsum using `-f standard-verbose -- -v -count=1 -race ./somepackage`, then compare its handling of the embedded `go test -json` output with direct `go test`. Done means the passing run produces no false error and preserves the successful status code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100