var ( // Public Errors ErrSnapshotCreated = fmt.Errorf("snapshot(s) created. Please rerun your tests") ErrSnapshotUpdated = fmt.Errorf("snapshot(s) updated. Please rerun your tests") ErrMismatch = fmt.Errorf("expected snapshot differs from actual") )
func Snap(t *testing.T, a any)
Snap is the actual call used in tests (i.e. snapshot.Snap(t, result)), which calls a version of Snap that uses Config as a receiver. Only one interface should be passed to snap at a time such that only one snapshot is created, updated, or compared to at a time. Table-driven-tests can be utilized to create, update, or compare one snapshot per test case.