testing

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT-0 Imports: 7 Imported by: 0

Documentation

Overview

The testing package contains utilities for autotests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoldenEqual

func GoldenEqual(tb testing.TB, output io.Reader)

GoldenEqual compares the bytes of the provided output with the contents of the golden file for a exact match.

When running go test with the -update flag, the contents of golden-files will be overwritten with the provided contents of output, creating the testdata/ directory if it does not exist.

Check TestGoldenEqual in testing_test.go and testdata/TestGoldenEqual.golden for example usage.

See: https://youtu.be/8hQG7QlcLBk?t=749

Types

This section is empty.

Jump to

Keyboard shortcuts

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