-
-
Notifications
You must be signed in to change notification settings - Fork 698
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
Implement iterable
assertion
#1592
Conversation
77ca057
to
c0e6dd7
Compare
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.
I’m curious why explicitly disallow string for this check?
You know, I don't remember why I put that in there. I have a vague memory of the |
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.
Is this bit meant to be part of this PR?
Not sure if GitHub is glitching but I can't see what this is referring to. I assume it's the |
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.
I think this is good but I am still a little uneasy about overloading .an()
too much.
curious, do you prefer im guessing you're unsure of leaning heavily on |
I'd prefer each assertion (especially core assertions) to map to something that a user can reproduce with a single expression. It makes it far easier for us to document, and for users to internalise. If they know |
makes sense to me 👍 thanks for the explanation, i do agree |
I'm happy to change this. I'd rather nip this in the bud now than trying to untangle it later. |
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.
Great stuff
Pulled this out of #1583 so that these PRs make more logical sense.
This PR implemensts a
iterable
/isIterable
assertion that checks a given object forSymbol.iterator
but notably excludesstring
which does haveSymbol.iterator
but we don't consider to be "iterable".