golden

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Golden

type Golden interface {
	// AssertGolden compares the actual output of a function with the expected output.
	// Update the golden by passing the -update flag to the test.
	AssertGolden(t *testing.T, goldenFile string, actual interface{}, msgsAndArgs ...interface{})
}

Golden tests are used to compare the actual output of a function with the expected output.

func NewGolden

func NewGolden(t *testing.T) Golden

NewGolden creates a new goldenImpl implementation used for tests

Jump to

Keyboard shortcuts

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