MCPcopy Index your code
hub / github.com/angular/angular / testCallback

Function testCallback

packages/zone.js/test/performance/performance_setup.js:169–185  ·  view source on GitHub ↗
(api, count)

Source from the content-addressed store, hash-verified

167 }
168
169 function testCallback(api, count) {
170 var promises = [Promise.resolve(1)];
171 for (var i = 0; i < count; i++) {
172 var r = api.run();
173 if (api.isAsync) {
174 promises.push(r);
175 }
176 }
177
178 for (var i = 0; i < count; i++) {
179 var r = api.nativeRun();
180 if (api.isAsync) {
181 promises.push(r);
182 }
183 }
184 return Promise.all(promises);
185 }
186
187 function measureCallback(api, ops) {
188 var times = ops.times;

Callers 1

testFunctionFunction · 0.85

Calls 4

resolveMethod · 0.65
runMethod · 0.65
pushMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…