golden

package module
v0.0.0-...-2d8a85f Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireEqual

func RequireEqual(tb testing.TB, out []byte)

RequireEqual is a helper function to assert the given output is the expected from the golden files, printing its diff in case it is not.

Golden files contain the raw expected output of your tests, which can contain control codes and escape sequences. When comparing the output of your tests, RequireEqual will escape the control codes and sequences before comparing the output with the golden files.

You can update the golden files by running your tests with the -update flag.

func RequireEqualEscape deprecated

func RequireEqualEscape(tb testing.TB, out []byte, escapes bool)

RequireEqualEscape is a helper function to assert the given output is the expected from the golden files, printing its diff in case it is not.

Deprecated: Use RequireEqual instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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