goldentest

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertJSON

func AssertJSON(t testing.TB, got any, name string)

AssertJSON compares got with a canonical JSON fixture under testdata/golden. Set UPDATE_GOLDEN=1 to rewrite the fixture from got.

func AssertNoJSONPath

func AssertNoJSONPath(t testing.TB, got any, path ...string)

AssertNoJSONPath fails if a provider payload includes an unsupported field.

func CanonicalJSON

func CanonicalJSON(value any) ([]byte, error)

CanonicalJSON returns indented JSON with deterministic map key ordering.

func GoldenPath

func GoldenPath(t testing.TB, name string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL