testutility

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertMatchFixtureJSON

func AssertMatchFixtureJSON[V any](t *testing.T, path string, val V)

AssertMatchFixtureJSON matches the JSON at path with the value val, failing if not equal, printing out the difference.

func CreateJSONFixture

func CreateJSONFixture[V any](t *testing.T, path string, val V)

CreateJSONFixture creates a JSON file at path of the value val, can be used with AssertMatchFixtureJSON to compare against future values.

func LoadJSONFixture

func LoadJSONFixture[V any](t *testing.T, path string) V

LoadJSONFixture loads a JSON fixture file and returns the decoded version.

Types

This section is empty.

Jump to

Keyboard shortcuts

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