-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
sinon.match.each ? #1624
Comments
It could be named |
In addition, one could find useful to check that at least one enumerated value matches. |
I think that would be a great addition to matchers. My preference leans more towards using names that are more like |
Added new matcher - match.every, which matches on an object or iterable if all of the properties (or elements, respectively) match the given predicate.
Added new matcher - match.some, which matches on an object or iterable if some of the properties (or elements, respectively) match the given predicate.
* Add match.every (#1624) Added new matcher - match.every, which matches on an object or iterable if all of the properties (or elements, respectively) match the given predicate. * Add match.some (#1624) Added new matcher - match.some, which matches on an object or iterable if some of the properties (or elements, respectively) match the given predicate.
This has been implemented by #1661 and shipped as |
* Add match.every (sinonjs#1624) Added new matcher - match.every, which matches on an object or iterable if all of the properties (or elements, respectively) match the given predicate. * Add match.some (sinonjs#1624) Added new matcher - match.some, which matches on an object or iterable if some of the properties (or elements, respectively) match the given predicate.
It would be very great to have a matcher that exactly act like
sinon.match.has
but on every enumerated value in an array / objectUse case :
That could be turned to
The text was updated successfully, but these errors were encountered: