You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An ES6 Set should work with the members function just like an array.
Pass conditions
expect(newSet([1,2,3])).to.have.members([2,1,3]);expect(newSet([{a: 1}])).to.have.deep.members([{a: 1}]);expect(newSet([1,2,3])).to.have.ordered.members([1,2,3]);// it may also be a good idea to flip it and allow sets to be used just as arrays wouldexpect([1,2,3]).to.have.members(newSet([2,1,3]));expect([{a: 1}]).to.have.deep.members(newSet([{a: 1}]));expect([1,2,3]).to.have.ordered.members(newSet([1,2,3]));
Fail conditions should eb the exact same as that of arrays.
The text was updated successfully, but these errors were encountered:
@rijnhard It makes sense to me that .members should support both Maps and Sets. In the meantime, it's worth noting though that .keys already provides some of the functionality you're looking for:
This would be awesome! We've added this to our Roadmap https://github.com/chaijs/chai/projects/2! We'll be releasing chai 5 soon, but for now I'll close this issue because it is tracked on our roadmap.
Similar to #632
An ES6 Set should work with the members function just like an array.
Pass conditions
Fail conditions should eb the exact same as that of arrays.
The text was updated successfully, but these errors were encountered: