-
-
Notifications
You must be signed in to change notification settings - Fork 775
Closed
Labels
Description
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.
- Sinon version : 3.2.0
- Environment : nodejs
- Example URL :
- Other libraries you are using:
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
const stub = sinon.stub();
stub
.onFirstCall()
.throws();
try {
stub();
console.log('WRONG');
} catch(e) {
console.log('OK');
}