Documentation
¶
Overview ¶
Package helpers bundles JSON:API test utilities — diff assertions against a wire payload, matchers against decoded resources, golden-file comparison — for use from service-level integration tests.
Index ¶
- func AssertEqualDateOnly(t *testing.T, expected, actual time.Time)
- func AssertEqualFile(t *testing.T, filePath string, content io.Reader, updateGoldenFile bool)
- func AssertEqualGoldenFile(t *testing.T, filePath string, content io.Reader, updateGoldenFile bool)
- func AssertEqualNullableDateOnly(t *testing.T, expected, actual *time.Time)
- func AssertEqualTimeOnly(t *testing.T, expected, actual time.Time)
- func Map[I any, O any](input []I, transform func(I) O) []O
- func MatchNullableTime(want *time.Time) func(*time.Time) bool
- func PointerOf[T any](v T) *T
- func SliceOfPointers[T any](vv ...T) []*T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEqualFile ¶
func AssertEqualGoldenFile ¶
func SliceOfPointers ¶
func SliceOfPointers[T any](vv ...T) []*T
SliceOfPointers returns a slice of *T from the specified values.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.