Asserts that at least one item contained in a Set satisfies a given value, function or other assertion.
expect(new Set([1, 2, 3]), 'to have an item satisfying', 4);
expected new Set([ 1, 2, 3 ]) to have an item satisfying 4new Set([1,//should equal 42,//should equal 43//should equal 4])
In order to check a property holds for at least one item, an assertion can be passed as the argument – in this example we assert that one of the items in the set is a number:
expect(new Set(['a', false, []]),'to have an item satisfying','to be a number');
expected new Set([ 'a', false, [] ]) to have an item satisfying to be a numbernew Set(['a',//should be a numberfalse,//should be a number[]//should be a number])