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
varspy1=sinon.spy().named('spy1');spy1(123);varspy2=sinon.spy().named('spy2');expect([spy1],'to have calls satisfying',function(){spy1(123);spy2(456);});
... which currently passes because the assertion is only tracking the spies that are passed as the subject.
Unfortunately there's no easy way to detect the spy2(456); call as there's no useful require('sinon').spy().__proto__ or similar to snoop into, and sinon doesn't keep track of all the spies it has created, except when using a sandbox (#15).
Ideas are very welcome :)
The text was updated successfully, but these errors were encountered:
I once did something like this:
... which currently passes because the assertion is only tracking the spies that are passed as the subject.
Unfortunately there's no easy way to detect the
spy2(456);
call as there's no usefulrequire('sinon').spy().__proto__
or similar to snoop into, and sinon doesn't keep track of all the spies it has created, except when using a sandbox (#15).Ideas are very welcome :)
The text was updated successfully, but these errors were encountered: