package
1.1.4
Repository: https://github.com/getstream/testify.git
Documentation: pkg.go.dev

# Functions

Condition uses a Comparison to assert a complex condition.
Contains asserts that the specified string, list(array, slice...) or map contains the specified substring or element.
Empty asserts that the specified object is empty.
Equal asserts that two objects are equal.
EqualError asserts that a function returned an error (i.e.
EqualValues asserts that two objects are equal or convertable to the same types and equal.
Error asserts that a function returned an error (i.e.
Exactly asserts that two objects are equal is value and type.
Fail reports a failure through.
FailNow fails test.
False asserts that the specified value is false.
HTTPBodyContains asserts that a specified handler returns a body that contains a string.
HTTPBodyNotContains asserts that a specified handler returns a body that does not contain a string.
HTTPError asserts that a specified handler returns an error status code.
HTTPRedirect asserts that a specified handler returns a redirect status code.
HTTPSuccess asserts that a specified handler returns a success status code.
Implements asserts that an object is implemented by the specified interface.
InDelta asserts that the two numerals are within delta of each other.
InDeltaSlice is the same as InDelta, except it compares two slices.
InEpsilon asserts that expected and actual have a relative error less than epsilon Returns whether the assertion was successful (true) or not (false).
InEpsilonSlice is the same as InEpsilon, except it compares two slices.
IsType asserts that the specified objects are of the same type.
JSONEq asserts that two JSON strings are equivalent.
Len asserts that the specified object has specific length.
New makes a new Assertions object for the specified TestingT.
Nil asserts that the specified object is nil.
NoError asserts that a function returned no error (i.e.
NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element.
NotEmpty asserts that the specified object is NOT empty.
NotEqual asserts that the specified values are NOT equal.
NotNil asserts that the specified object is not nil.
NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.
NotRegexp asserts that a specified regexp does not match a string.
NotZero asserts that i is not the zero value for its type and returns the truth.
Panics asserts that the code inside the specified PanicTestFunc panics.
Regexp asserts that a specified regexp matches a string.
True asserts that the specified value is true.
WithinDuration asserts that the two times are within duration delta of each other.
Zero asserts that i is the zero value for its type and returns the truth.

# Structs

Assertions provides assertion methods around the TestingT interface.

# Interfaces

TestingT is an interface wrapper around *testing.T.