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

Function testFunction

packages/zone.js/test/performance/performance_setup.js:271–283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

269 var times = typeof testTarget.times === 'number' ? testTarget.times : 5;
270
271 var testFunction = function () {
272 var promises = [];
273 apis.forEach(function (api) {
274 if (api.isCallback) {
275 var r = testCallback(api, count / 100);
276 promises.push(api.isAsync ? r : Promise.resolve(1));
277 } else {
278 var r = testAddRemove(api, count);
279 promises.push[api.isAsync ? r : Promise.resolve(1)];
280 }
281 });
282 return Promise.all(promises);
283 };
284
285 return runAsync(testFunction, times).then(function () {
286 var displayText = `running ${count} times\n`;

Callers

nothing calls this directly

Calls 6

testCallbackFunction · 0.85
testAddRemoveFunction · 0.70
resolveMethod · 0.65
forEachMethod · 0.45
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…