MCPcopy
hub / github.com/Leaflet/Leaflet.markercluster / delegateToCalls

Function delegateToCalls

spec/sinon.js:1085–1111  ·  view source on GitHub ↗
(api, method, matchAny, actual, notCalled)

Source from the content-addressed store, hash-verified

1083 sinon.extend(spy, (function () {
1084
1085 function delegateToCalls(api, method, matchAny, actual, notCalled) {
1086 api[method] = function () {
1087 if (!this.called) {
1088 if (notCalled) {
1089 return notCalled.apply(this, arguments);
1090 }
1091 return false;
1092 }
1093
1094 var currentCall;
1095 var matches = 0;
1096
1097 for (var i = 0, l = this.callCount; i < l; i += 1) {
1098 currentCall = this.getCall(i);
1099
1100 if (currentCall[actual || method].apply(currentCall, arguments)) {
1101 matches += 1;
1102
1103 if (matchAny) {
1104 return true;
1105 }
1106 }
1107 }
1108
1109 return matches === this.callCount;
1110 };
1111 }
1112
1113 function matchingFake(fakes, args, strict) {
1114 if (!fakes) {

Callers 1

sinon.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…