MCPcopy Create free account
hub / github.com/jquery/jquery-ui / processTaskQueue

Function processTaskQueue

external/qunit/qunit.js:2284–2304  ·  view source on GitHub ↗

* Process the first task on the taskQueue as a promise. * Each task is a function added by Test#queue() in /src/test.js

(start)

Source from the content-addressed store, hash-verified

2282 * Each task is a function added by Test#queue() in /src/test.js
2283 */
2284 function processTaskQueue(start) {
2285 if (taskQueue.length && !config.blocking) {
2286 var elapsedTime = performance.now() - start;
2287
2288 // The updateRate ensures that a user interface (HTML Reporter) can be updated
2289 // at least once every second. This can also prevent browsers from prompting
2290 // a warning about long running scripts.
2291 if (!setTimeout$1 || config.updateRate <= 0 || elapsedTime < config.updateRate) {
2292 var task = taskQueue.shift();
2293 _Promise.resolve(task()).then(function () {
2294 if (!taskQueue.length) {
2295 advance();
2296 } else {
2297 processTaskQueue(start);
2298 }
2299 });
2300 } else {
2301 setTimeout$1(advance);
2302 }
2303 }
2304 }
2305
2306 /**
2307 * Advance the testQueue to the next test to process. Call done() if testQueue completes.

Callers 1

advanceTaskQueueFunction · 0.85

Calls 1

advanceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…