helpers

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEqualDateOnly

func AssertEqualDateOnly(t *testing.T, expected, actual time.Time)

func AssertEqualFile

func AssertEqualFile(t *testing.T, filePath string, content io.Reader, updateGoldenFile bool)

func AssertEqualGoldenFile

func AssertEqualGoldenFile(t *testing.T, filePath string, content io.Reader, updateGoldenFile bool)

func AssertEqualNullableDateOnly

func AssertEqualNullableDateOnly(t *testing.T, expected, actual *time.Time)

func AssertEqualTimeOnly

func AssertEqualTimeOnly(t *testing.T, expected, actual time.Time)

func Map

func Map[I any, O any](input []I, transform func(I) O) []O

func MatchNullableTime

func MatchNullableTime(want *time.Time) func(*time.Time) bool

func PointerOf

func PointerOf[T any](v T) *T

PointerOf returns a pointer to the provided value.

func SliceOfPointers

func SliceOfPointers[T any](vv ...T) []*T

SliceOfPointers returns a slice of *T from the specified values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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