-
-
Notifications
You must be signed in to change notification settings - Fork 770
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
.throws() in conjuction with .onFirstCall() doesn't work #1526
Comments
Not reproducible.
test.js
|
I've made the same environment like yours, and I'm still getting the same problem. I'm also able to reproduce that inside of the browser (Chrome) |
I'm an idiot (examine my test above). Reopening. |
Yeah! It makes sense ;) But at the first look I didn't spot anything wrong 😁 |
Created a test case suitable for
|
Fix regression for issue #1526 regarding onFirstCall().throws()
Hi,
After upgrade to Sinon 3.2.0, I've spotted that some of my tests are failing.
As a result of a quick investigation, I've found that .throws() is not throwing when it's used together with .onFirstCall(), onCall() etc.
I've checked this issue for .withArgs() and it seems to work correctly.
What did you expect to happen?
It should throw an Error only on the first call or no of the call specified in the .onCall() method.
What actually happens
It doesn't throw any error.
How to reproduce
The text was updated successfully, but these errors were encountered: