Documentation
¶
Index ¶
- func AsJSON(v any) ([]byte, error)
- func Expect[A any](t testing.TB, actual A, matchers ...Matcher[A])
- func MatchSnapshot(name string, options ...snapshot.Option) internal.Matcher[*snapshot.Snapshot]
- func MustAsJSON(v any) []byte
- func NewCompareMatcher[A any, E any](name string, match func(a A, e E) bool) func(e E) Matcher[A]
- func NewSnapshot() *snapshot.Snapshot
- func ProjectRoot() string
- type ExpectedFormatter
- type Matcher
- func Be[T any](e T) Matcher[T]
- func BeEmpty[T any]() Matcher[T]
- func BeFalse() Matcher[bool]
- func BeNil[T any]() Matcher[T]
- func BeTrue() Matcher[bool]
- func Equal[T any](e T) Matcher[T]
- func HaveCap[T any](c int) Matcher[T]
- func HaveLen[T any](c int) Matcher[T]
- func NewMatcher[A any](name string, match func(a A) bool) Matcher[A]
- func Not[A any](matcher Matcher[A]) Matcher[A]
- func NotBe[T any](e T) Matcher[T]
- func NotBeEmpty[T any]() Matcher[T]
- func NotBeNil[T any]() Matcher[T]
- func NotEqual[T any](e T) Matcher[T]
- func NotHaveCap[T any](c int) Matcher[T]
- func NotHaveLen[T any](c int) Matcher[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchSnapshot ¶
func MustAsJSON ¶
func NewCompareMatcher ¶
func NewSnapshot ¶
func ProjectRoot ¶
func ProjectRoot() string
Types ¶
type ExpectedFormatter ¶
type ExpectedFormatter = internal.ExpectedFormatter
Click to show internal directories.
Click to hide internal directories.