package
0.0.0-20250319160420-55095cf70add
Repository: https://github.com/matrix-org/complement.git
Documentation: pkg.go.dev
# Functions
EXPERIMENTAL CheckOff an item from the list.
EXPERIMENTAL CheckOffAll checks that a list contains exactly the given items, in any order.
EXPERIMENTAL CheckOffAllAllowUnwanted checks that a list contains all of the given items, in any order.
EXPERIMENTAL ContainSubset checks that every item in smaller is in larger, failing the test if at least 1 item isn't.
Equal ensures that got==want else logs an error.
GetJSONFieldStr extracts the string value under `wantKey` or fails the test.
EXPERIMENTAL HaveInOrder checks that the two slices match exactly, failing the test on mismatches or omissions.
EXPERIMENTAL MatchFailure consumes the HTTP response and fails if the response is 2xx.
MatchFederationRequest performs JSON assertions on incoming federation requests.
EXPERIMENTAL MatchGJSON performs JSON assertions on a gjson.Result object.
EXPERIMENTAL MatchJSONBytes performs JSON assertions on a raw json byte slice.
EXPERIMENTAL MatchRequest consumes the HTTP request and performs HTTP-level assertions on it.
EXPERIMENTAL MatchResponse consumes the HTTP response and performs HTTP-level assertions on it.
EXPERIMENTAL MatchSuccess consumes the HTTP response and fails if the response is non-2xx.
EXPERIMENTAL NotContainSubset checks that every item in smaller is NOT in larger, failing the test if at least 1 item is.
NotEqual ensures that got!=want else logs an error.
NotError will ensure `err` is nil else terminate the test with `msg`.
EXPERIMENTAL ParseJSON will ensure that the HTTP request/response body is valid JSON, then return the body, else terminate the test.
EXPERIMENTAL StartWithStr ensures that got starts with wantPrefix else logs an error.