Asserts that a Set instance contains a given element.
expect(new Set([1, 2, 3]), 'to contain', 3);
You get a diff when the assertion fails:
expect(new Set([1, 2, 3]), 'to contain', 4);
expected new Set([ 1, 2, 3 ]) to contain 4new Set([1,2,3//missing 4])
The assertion can be negated using the not
flag:
expect(new Set([1, 2, 3]), 'not to contain', 4);
expect(new Set([1, 2, 3]), 'not to contain', 3);
expected new Set([ 1, 2, 3 ]) not to contain 3new Set([1,2,3//should be removed])