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
It looks like sinon-chai is ignoring lastCall property on a spy inside an expect. For example: expect(spy.lastCall).to.have.been.calledWith(argUsedOnLastCall)
sinon-chai ignores the lastCall property and does the same thing that it would do with this line: expect(spy).to.have.been.calledWith(argUsedOnLastCall)
where it checks argUsedOnLastCall against all the calls that have been made with that spy. However, if you were to do this in pure sinon it behaves correctly: sinon.assert.calledWith(lastCall, argUsedOnLastCall) and checks argUsedOnLastCall only against the last call of the spy.
The text was updated successfully, but these errors were encountered:
It looks like sinon-chai is ignoring lastCall property on a spy inside an expect. For example:
expect(spy.lastCall).to.have.been.calledWith(argUsedOnLastCall)
sinon-chai ignores the lastCall property and does the same thing that it would do with this line:
expect(spy).to.have.been.calledWith(argUsedOnLastCall)
where it checks
argUsedOnLastCall
against all the calls that have been made with that spy. However, if you were to do this in pure sinon it behaves correctly:sinon.assert.calledWith(lastCall, argUsedOnLastCall)
and checksargUsedOnLastCall
only against the last call of the spy.The text was updated successfully, but these errors were encountered: