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
assert.calledOnceWithMatch #84
Comments
Should it assert that it was called only once and the given arguments match? Or should it assert that it was called once with the arguments but it might have been called again with different arguments? |
Scratch the original comment.... |
Wouldn't |
Called once with match is on the way: #2294 |
awesome! |
@meetmangukiya The assertions that check two things are ambiguous in name. That's why I do not use them. We had this discussion multiple times:
Of course, if you check the docs, you know :) We do have the |
Since we do have these combined assertions now, I tend to always read them as "and" expressions of the underlying assertions. They're basically short hands to fold two assert calls into one. That's a rule we should stick with for consistency, I think. |
assert.match
is the best thing way before sliced bread, and I want it with everything. But most of all I want it withassert.calledOnceWith
.The usecase that prompted this issue was todays snafu:
stubbing out this so-and-so makes for some unwieldy
getCall
andargs
incantations. Sinon is for beauty, and let me tell you - this code I just wrote isn't gonna win any pageants. :)The text was updated successfully, but these errors were encountered: