helper

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertFailedTest

func AssertFailedTest(t *testing.T, gt *TSpy)

AssertFailedTest allows us to spy on TSpy

func AssertPassTest

func AssertPassTest(t *testing.T, gt *TSpy)

func AssertReportContains

func AssertReportContains(t *testing.T, g *TSpy, s string)

Types

type TSpy

type TSpy struct {
	*testing.T
	// contains filtered or unexported fields
}

TSpy is a replacement of *testing.T for some tests of the golden library. With it, we can spy if the Verify method fails when differences between subject and snapshot are found

func (*TSpy) Errorf

func (t *TSpy) Errorf(_ string, report ...any)

func (*TSpy) Reset

func (t *TSpy) Reset()

Jump to

Keyboard shortcuts

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