You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testcase below should print the "beforeEach" twice, but it only happens once.
constassert=require('chai').assert;constsinon=require('sinon');describe('resetHistory',function(){varnum=null;vari=0;beforeEach(function(){num=sinon.createStubInstance(Number);console.log('beforeEach',++i);});afterEach(()=>{// Restore the default sandbox heresinon.restore();});describe('called on individual stub method',function(){it('should clear "called" status on stub',function(){num.toFixed();assert.isTrue(num.toFixed.called);num.toFixed.resetHistory();assert.isFalse(num.toFixed.called);});});describe('called on module',function(){it('should clear "called" status on all stubs',function(){num.toFixed();assert.isTrue(num.toFixed.called);sinon.resetHistory();assert.isFalse(num.toFixed.called);});});});
The text was updated successfully, but these errors were encountered:
See sinonjs/sinon#2022 (comment).
Testcase below should print the "beforeEach" twice, but it only happens once.
The text was updated successfully, but these errors were encountered: