Skip to content

Type Matcher<R> ​

Matcher<R> = R | ErrorMatcher | AssertionMatcher<R>

Source: test.ts

Defines the matching criteria for a test case.

This can either be a plain return value, in which case the test will fail if the function returns a different value, or more complex criteria that determines whether the test will fail. E.g., an ErrorMatcher will fail if the function does not throw an error of a certain type and with a certain message.

Type Parameters ​

R ​

R = undefined

The type of value the function being tested returns.

See ​

CustomTestAPI.cases

Built by Prozilla