Like Nodejs's jest in golang.
Reduced a lot of log noise, only keeping the logs that the author considers necessary for debugging during the testing process.
Press the f
key to focus on your first error, gojest is like jest(nodejs) in golang.
This gif is focus test first fail on keydown f
:
- Interactive CLI
- Keep your test behavior, Just use
go test ./...
- Remove noice log
- Watch when edit code run last action
$ go install github.com/ymzuiku/gojest@latest
In your project run
run all:
gojest
Run sub dir:
gojest ./dir/...
Auto run last action when your edit code:
gojest -w
Run Terst function:
gojest -run TestMyFunction -w
Timeout 5s:
gojest -w -t 5s
parallel 10:
gojest -w -p 10
And when your keydown:
- Test all:
a
- Focus test first fail:
f
- Test all no cache:
shift+a
- Focus test first fail no cache:
shift+f
- Helps:
h
- Quit:
q