Skip to content

Latest commit

 

History

History
75 lines (49 loc) · 1.03 KB

README.md

File metadata and controls

75 lines (49 loc) · 1.03 KB

gojest

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:

feature

  • Interactive CLI
  • Keep your test behavior, Just use go test ./...
  • Remove noice log
  • Watch when edit code run last action

install

$ go install github.com/ymzuiku/gojest@latest

use

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