Approval-based snapshot testing library for Go (mirror)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Initial commit

Patrick Dewey 4b2ba0cb

+64
+10
.gitignore
··· 1 + *.exe 2 + *.exe~ 3 + *.dll 4 + *.so 5 + *.dylib 6 + *.test 7 + *.out 8 + go.work 9 + go.work.sum 10 + .env
+18
README.md
··· 1 + # Freeze 2 + 3 + A [birdie](https://github.com/giacomocavalieri/birdie) and [insta](https://github.com/mitsuhiko/insta) inspired snapshot testing library for Go. 4 + 5 + TODO: screenshot 6 + 7 + ## Installation 8 + 9 + TODO: 10 + 11 + ## Usage 12 + 13 + TODO: 14 + 15 + ## Other Libraries 16 + 17 + - [go-snaps](https://github.com/gkampitakis/go-snaps) 18 + - [cupaloy](https://github.com/bradleyjkemp/cupaloy)
+20
freeze.go
··· 1 + package freeze 2 + 3 + type Snapshot struct { 4 + Version string 5 + TestName string 6 + Content string 7 + } 8 + 9 + type Config struct { 10 + snapshotDir string 11 + extension string 12 + } 13 + 14 + func Frame(t testingT, vals ...any) { 15 + t.Helper() 16 + } 17 + 18 + func newSnapshot(name, content string, cfg Config) { 19 + 20 + }
+3
go.mod
··· 1 + module github.com/ptdewey/freeze 2 + 3 + go 1.25.2
+13
utils.go
··· 1 + package freeze 2 + 3 + // DOCS: 4 + type testingT interface { 5 + Helper() 6 + Skip(...any) 7 + Skipf(string, ...any) 8 + SkipNow() 9 + Name() string 10 + Error(...any) 11 + Log(...any) 12 + Cleanup(func()) 13 + }