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

Function fnPromise

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

Source from the content-addressed store, hash-verified

104 var runAsync = (_global['__zone_symbol__runAsync'] = function (testFn, times, _delay) {
105 var delay = _delay | 100;
106 const fnPromise = function () {
107 return new Promise(function (res, rej) {
108 // run test with a setTimeout
109 // several times to decrease measurement error
110 setTimeout(function () {
111 testFn().then(function () {
112 res();
113 });
114 }, delay);
115 });
116 };
117 var promiseFactories = [];
118 for (var i = 0; i < times; i++) {
119 promiseFactories.push({factory: fnPromise, context: {}});

Callers

nothing calls this directly

Calls 3

setTimeoutFunction · 0.85
thenMethod · 0.65
testFnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…