Documentation ¶
Index ¶
- Constants
- func AssertGolden(t TB, filename string, data []byte)
- func AssertGoldenDiff(t TB, filename string, a, b string)
- func AssertGoldenDiffJSON(t TB, filename string, a, b interface{})
- func AssertGoldenJSON(t TB, filename string, data interface{})
- func AssertGoldenYAML(t TB, filename string, data interface{})
- type TB
Constants ¶
View Source
const GoldenUpdateEnv = `TESTUTIL_UPDATE_GOLDEN`
Variables ¶
This section is empty.
Functions ¶
func AssertGolden ¶
AssertGolden tests, if the content of filename matches given data. On missmatch the test fails. When setting the TESTUTIL_UPDATE_GOLDEN environment variable, it will update the file which can be compared via a VCS diff.
func AssertGoldenDiff ¶
AssertGoldenDiff creates a unified diff of two texts and compares it with the golden file.
func AssertGoldenDiffJSON ¶
AssertGoldenDiffJSON works like AssertGoldenDiff, but converts the data to JSON first.
func AssertGoldenJSON ¶
AssertGoldenJSON works like AssertGolden, but converts the data to JSON file.
func AssertGoldenYAML ¶
AssertGoldenYAML works like AssertGolden, but converts the data to YAML file.
Types ¶
Click to show internal directories.
Click to hide internal directories.