Creates a new instance of ObjectContaining asymmetric matcher.
Expected object pattern that contains a subset of the properties.
If true, matches if the received object does not contain the expected properties or if the properties do not match.
Symbol to identify asymmetric matcher.
ProtectedinverseIf true, the matcher will check for non-matching values.
ProtectedsampleThe sample value to match against.
Checks if the value matches.
The value to test.
true if the value matches, otherwise false.
Returns the expected type of the asymmetric matcher.
The expected type of the asymmetric matcher.
ProtectedgetReturns the context for the asymmetric matcher.
The context for the asymmetric matcher.
OptionaltoReturns a string representation of the asymmetric matcher for use in error messages.
A string representation of the asymmetric matcher for error messages.
Returns a string representation of the asymmetric matcher.
A string representation of the asymmetric matcher.
Assymmetric matcher that matches an object that contains and matches all of the properties in the expected object. Note that received object may be a superset of the expected object and contain some extra properties.
Use this method inside expect(value).toEqual(expected) to perform pattern matching. Object properties can be matchers to further relax the expectation. See examples.
Usage