OptionalactualThe actual value or condition that was encountered
OptionaldiffPre-computed diff string. When provided, this bypasses jest-diff entirely
and is used as-is in the error output. Takes precedence over
formatActual, formatExpected, and diffOptions.
OptionaldiffOverride default jest-diff options. Only used when diff is not provided.
jest-diff for available options
OptionalexpectedThe expected value or condition that was not met
OptionalformatCustom formatter for the actual value in diff output. Only used when diff
is not provided. The returned string is passed to jest-diff.
The actual value to format
String representation for diff display
OptionalformatCustom formatter for the expected value in diff output. Only used when
diff is not provided. The returned string is passed to jest-diff.
The expected value to format
String representation for diff display
OptionalmessageA human-readable message describing the failure
Object which may be returned from assertion function implementations to provide better failure reporting to the end-user.