Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustGetTestData ¶
MustGetTestData reads testdata and unmarshals it to the given type, panicking if an error occurs.
func MustUnmarshalFromFile ¶ added in v0.30.0
MustUnmarshalFromFile reads testdata and unmarshals it to the given type, panicking if an error occurs.
func ReadFixture ¶
ReadFixture reads testdata fixtures, panicking if an error occurs.
The prefix `./testdata/` is automatically added to the filename. Tests can 'escape' the testdata directory by prefixing the filename with `../`.
Example:
ReadFixture("foo.json") -> ./testdata/foo.json
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.