-
Notifications
You must be signed in to change notification settings - Fork 108
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
[feature-request] support for expectations based on sinon matcher #92
Comments
Isn't this calledWithMatch? All the other asserters should also accept matchers wherever sinon does. |
The point actually is to use this without any spy. |
something like this:
|
This library is strictly dedicated to exposing the existing Sinon assertions through Chai. If you want to use matchers without spies, you'll need to first open such an issue on Sinon, and then we'll work on exposing it here if they accept that feature. |
Hello! I don't know when it was added, but current Sinon has
For names, I haven't come up with any good options. |
I looked into implementing this, and although there is a Sinon assertion now, due to the way Then I remembered that Sinon's matchers are actually broken out into their own library, |
Hi,
I've been looking for a chai plugin to:
In short, I want what Jasmine.any() gives me in expectations.
With chai's colored diff it would be only better.
I've found a few (chai-fuzzy, chai-subset ...), but none that allow easy matching of a function property, or insertion of custom matcher... (interested if you know any that do).
Sinon Matchers actually do exactly what I want on the matching side.
I'm wondering if you would consider adding expectations to your plugin, to support the use of sinon.match directly.
For the time being I've written a prototype for my team:
Then we can use it like this:
The exact semantics would need more thinking and discussion, but do you think it has a place in your module (since it's called sinon-chai ;) ), or should I make my own separately ?
The text was updated successfully, but these errors were encountered: