testutility

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptanceTests added in v1.4.3

func AcceptanceTests(t *testing.T, reason string)

AcceptanceTests marks this test function as a extended that require additional dependencies automatically skipped unless running in a CI environment

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 AssertMatchFixtureText added in v1.4.1

func AssertMatchFixtureText(t *testing.T, path string, actual string)

AssertMatchFixtureText matches the Text file at path with actual

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 CreateTextFixture added in v1.4.1

func CreateTextFixture(t *testing.T, path string, val string)

CreateTextFixture creates a text 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