-
-
Notifications
You must be signed in to change notification settings - Fork 694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set support in same members #1583
Conversation
should we try support all iterables? may be possible by looking for just wondering if we want it to support something which isn't a set or array but is iterable |
I think supporting iterators generally is a good idea. Otherwise though this is a good step forward. |
Yes! I wanted to change this: to |
Something that I found is that |
lib/chai/core/assertions.js
Outdated
@@ -3136,26 +3142,29 @@ function isSubsetOf(_subset, _superset, cmp, contains, ordered) { | |||
* @api public | |||
*/ | |||
|
|||
Assertion.addMethod('members', function (subset, msg) { | |||
Assertion.addMethod('iterable', function(msg) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 this is good
2219136
to
a00c9e2
Compare
I was gonna point this PR to #1592 but I guess I can't because it's on a different remote. In any case, I split out the |
a00c9e2
to
393e2ea
Compare
I think this is good but might benefit from more tests. |
Fixes #1468
Add
Set
support tomembers
/sameMembers
. While doing that I want to introduce aiterable
assertion that I think could be useful.