Jest · Function
expect.extend
expect.extend adds custom matchers to Jest. A matcher returns pass and message values that control assertion results and failure output.
Last updated
Syntax
expect.extend(matchers)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
expectexpect.addEqualityTestersexpect.addSnapshotSerializerexpect.assertionsexpect.hasAssertionssetupFilesAfterEnv