Documentation ¶
Index ¶
- Variables
- func AsMultiLineYaml(title, content interface{}) string
- func Compare(name string, got, want interface{}, options ...CompareOptions) error
- func LineDiff(want, got string) string
- func MatchSnapshot(t *testing.T, extension string, b interface{})
- func MustJSON(j interface{}) string
- func MustToml(j interface{}) string
- func MustYaml(j interface{}) string
- func OverwriteSnapshot(t *testing.T, extension string, b []byte)
- func PrintMultiLineYaml(title, content interface{})
- func StringCompare(t *testing.T, want, got string) error
- func TPrintMultiLineYaml(t *testing.T, title, content interface{})
- func YamlUnmarshalAllowTabs(s string, j interface{}) error
- type CompareOptions
- type IncreasingTimeMock
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultCompareOptions = CompareOptions{true, true, true, false, false, false}
)
Functions ¶
func AsMultiLineYaml ¶
func AsMultiLineYaml(title, content interface{}) string
func Compare ¶
func Compare(name string, got, want interface{}, options ...CompareOptions) error
func MatchSnapshot ¶
func PrintMultiLineYaml ¶
func PrintMultiLineYaml(title, content interface{})
func TPrintMultiLineYaml ¶
func YamlUnmarshalAllowTabs ¶
Tabs are annoying in yaml, so lets just convert it.
Types ¶
type CompareOptions ¶
type IncreasingTimeMock ¶
type IncreasingTimeMock struct { Ticks time.Duration TickAmmount time.Duration sync.RWMutex StartTime time.Time }
func NewMockTimeNow ¶
func NewMockTimeNow() *IncreasingTimeMock
func (*IncreasingTimeMock) Now ¶
func (mt *IncreasingTimeMock) Now() time.Time
func (*IncreasingTimeMock) Tick ¶
func (mt *IncreasingTimeMock) Tick() time.Time
Click to show internal directories.
Click to hide internal directories.