Documentation ¶
Overview ¶
The code has been taken from "github.com/stretchr/testify/assert" but with a slight modification to use go-cmp instead of reflect in order to support additional options like IgnoreFields.
Index ¶
- func ElementsMatch(t assert.TestingT, listA, listB interface{}, opts ...cmp.Option) (ok bool)
- func EqualAsJSON(t *testing.T, expected, actual interface{}, args ...interface{})
- func EqualAsJSONExcept(t *testing.T, expected, actual interface{}, except []string, ...)
- func PrettifyJSONPayload(t *testing.T, payload interface{}) string
- func TimeDifferenceLess(t *testing.T, t1, t2 time.Time, seconds int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ElementsMatch ¶
ElementsMatch asserts that the specified listA(array, slice...) is equal to specified listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, the number of appearances of each of them in both lists should match.
assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2])
func EqualAsJSON ¶
func EqualAsJSONExcept ¶
func PrettifyJSONPayload ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.