Documentation
¶
Index ¶
- Variables
- func ParseMultiYaml(data []byte) ([]map[string]interface{}, error)
- func ReadMultiYaml(filename string) ([]map[string]interface{}, error)
- func ReadMultiYamlIO(f io.ReadCloser) ([]map[string]interface{}, error)
- func RequireEqualCmp(t *testing.T, expected, actual interface{}, opts ...cmp.Option)
- func SnapshotT(t *testing.T, snapshotFilePath string, actualBytes []byte, ...)
- type SnapshotOption
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSnapshotOptions = SnapshotOption{ UpdateSnapshots: lo.Contains([]string{"true", "1"}, os.Getenv("UPDATE_SNAPSHOTS")), ReadFunc: func(f io.ReadCloser) (any, error) { data, err := io.ReadAll(f) return data, err }, CompareFunc: func(expected, actual any) bool { return cmp.Equal(expected, actual) }, DiffFunc: func(expected, actual any) string { return cmp.Diff(expected, actual) }, }
Functions ¶
func ParseMultiYaml ¶
func ReadMultiYaml ¶
func ReadMultiYamlIO ¶
func ReadMultiYamlIO(f io.ReadCloser) ([]map[string]interface{}, error)
func RequireEqualCmp ¶
func SnapshotT ¶
func SnapshotT(t *testing.T, snapshotFilePath string, actualBytes []byte, options ...zoptions.MustOption[SnapshotOption])
Types ¶
Click to show internal directories.
Click to hide internal directories.