github caiolandgraf/grove v1.5.0
v1.5.0 — gest v2

latest releases: v1.5.2, v1.5.1
2 days ago

What's new

gest v2 support

Grove now fully supports gest v2, which runs on top of the native go test engine — bringing Jest-style output with full IDE support, caching and -race detection for free.

What changed

Before (v1) After (v2)
*_spec.go files with package main *_test.go files with package tests
func init() { gest.Register(s) } No registration needed
internal/tests/main.go entrypoint No main.go needed
Compiled to binary, run directly gest ./... or go test ./...
Watch mode built into the lib grove test -w delegates to gest --watch

grove make:test

Generates standard *_test.go files with a func Test<Name>(t *testing.T) entry point and s.Run(t) — no main.go, no init(), no Register(). On the first call, gest is added to the project's go.mod automatically.

package tests

import (
    "testing"
    "github.com/caiolandgraf/gest/v2/gest"
)

func TestUser(t *testing.T) {
    s := gest.Describe("User")
    s.It("should work", func(t *gest.T) {
        t.Expect(true).ToBeTrue()
    })
    s.Run(t)
}

grove test

Uses the gest CLI for beautiful Jest-style output when installed; falls back to go test -v automatically when absent.

grove test          # run all tests
grove test -c       # run + per-suite coverage report
grove test -w       # watch mode (delegates to gest --watch)
grove test -wc      # watch mode + coverage

# also works directly:
go test ./internal/tests/...

grove setup

Now installs the gest library (go get github.com/caiolandgraf/gest/v2@latest) and the gest CLI (go install github.com/caiolandgraf/gest/v2/cmd/gest@latest) automatically as part of project scaffolding.

grove update

Now updates both the gest library in go.mod and the gest CLI binary.

grove dev watcher

Updated to exclude *_test.go files from triggering application rebuilds (previously excluded *_spec.go).


Install / upgrade:

go install github.com/caiolandgraf/grove@latest

Don't miss a new grove release

NewReleases is sending notifications on new releases.