Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Assert ¶
Takes in an expected & result object, of any type. Asserts that their Go syntax representations (%#v) are the same. Prints a message on success if the ENV var DEBUG is set to "true". Fails the test if this is not true.
func AssertContains ¶
Takes in an expected slice of objects and an 'item' object, of any type Asserts that the 'item' is contained within the slice. Prints a message on success if the ENV var DEBUG is set to "true". Fails the test if this is not true.
func Debug ¶ added in v0.16.0
func Debug() bool
Checks if the test is running in Debug mode, i.e. has been run with the ENV var DEBUG=true. To do this, either first run `export DEBUG=true`, and then run the test command, or do it all at once with `DEBUG=true go test -v ./test“
func Fail ¶
Fails a test with a formatted message showing the expected vs. result. (These are both printed in %#v form)
func FlattenJSON ¶
Flattens a given json string, removing all tabs, spaces and newlines
Types ¶
This section is empty.