Asserts that a Set has a certain size.

expect(new Set([1, 2, 3]), 'to have size', 3);

In the case of a failing expectation you get the following output:

expect(new Set([1, 2, 3]), 'to have size', 4);
expected new Set([ 123 ]) to have size 4

The assertion can be negated using the not flag:

expect(new Set([1, 2, 3]), 'not to have size', 4);

And with a failing expectation:

expect(new Set([1, 2, 3]), 'not to have size', 3);
expected new Set([ 123 ]) not to have size 3