Asserts that an object matches a subset of properties.
method
test.Matchers.toMatchObject
@param subset
Subset of properties to match with.
expect({ a: 1, b: 2 }).toMatchObject({ b: 2 });
expect({ c: new Date(), d: 2 }).toMatchObject({ d: 2 });
method
Subset of properties to match with.
expect({ a: 1, b: 2 }).toMatchObject({ b: 2 });
expect({ c: new Date(), d: 2 }).toMatchObject({ d: 2 });