Asserts that a value contains and equals what is expected.
This matcher will perform a deep equality check for members of arrays, rather than checking for object identity.
Symbol
Asserts that a value contains and equals what is expected.
This matcher will perform a deep equality check for members of arrays, rather than checking for object identity.
the expected value
expect([{ a: 1 }]).toContainEqual({ a: 1 });
expect([{ a: 1 }]).not.toContainEqual({ a: 2 });