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@latestIn your project run
run all:
gojestRun sub dir:
gojest ./dir/...Auto run last action when your edit code:
gojest -wRun Terst function:
gojest -run TestMyFunction -wTimeout 5s:
gojest -w -t 5sparallel 10:
gojest -w -p 10And 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
