toHaveNoOtherSpyInteractions implementation

This commit is contained in:
Eradev
2025-01-10 21:05:12 -05:00
parent 7683325d68
commit 4732012f1c
16 changed files with 354 additions and 12 deletions

View File

@@ -125,6 +125,16 @@ getJasmineRequireObj().CallTracker = function(j$) {
this.saveArgumentsByValue = function() {
opts.cloneArgs = true;
};
/**
* Get the number of unverified invocations of this spy.
* @name Spy#calls#unverifiedCount
* @function
* @return {Integer}
*/
this.unverifiedCount = function() {
return calls.reduce((count, call) => count + (call.verified ? 0 : 1), 0);
};
}
return CallTracker;