Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesFromFile ¶
BytesFromFile returns file as bytes; propagates err (e.g. file does not exist) as test failure reason
func MatchSnapshot ¶
MatchSnapshot compares the actual data against a stored snapshot file.
If the snapshot file doesn't exist, it creates a new draft file (with a .draft suffix) containing the actual data and marks test failed.
If the snapshot file exists but its content differs from the actual data, it updates the draft file with the actual data, reports test failure and instructs on how to update the snapshot.
If the snapshot file exists and matches the actual data, it ensures any existing draft file is removed and the test passes for this check.
Types ¶
This section is empty.