Closed podhmo closed 5 years ago
# first-time, save golden data, at `testdata/<func name>.golden`
$ go test
# after that, compare with golden data (not saved)
$ go test
# if you want to update golden data
$ SNAPSHOT=<func name> go test
# or update all.
$ SNAPSHOT=1 go test
<func name>
?this
$ go test -v
=== RUN TestSimple # <- this
--- PASS: TestSimple (0.00s)
snapshot.go:52: load testdata: "testdata/TestSimple.golden"
todo: document