MCPcopy Index your code
hub / github.com/ampproject/amphtml / runChunksForTesting

Function runChunksForTesting

src/chunk.js:129–144  ·  view source on GitHub ↗
(elementOrAmpDoc)

Source from the content-addressed store, hash-verified

127 * @param {!Element|!./service/ampdoc-impl.AmpDoc} elementOrAmpDoc
128 */
129export function runChunksForTesting(elementOrAmpDoc) {
130 const service = chunkInstanceForTesting(elementOrAmpDoc);
131 const errors = [];
132 while (true) {
133 try {
134 if (!service.execute_(/* idleDeadline */ null)) {
135 break;
136 }
137 } catch (e) {
138 errors.push(e);
139 }
140 }
141 if (errors.length) {
142 throw errors[0];
143 }
144}
145
146/**
147 * The priority of a chunk task. Higher priority tasks have higher values.

Callers 2

runChunksFunction · 0.90
test-runtime.jsFile · 0.90

Calls 3

chunkInstanceForTestingFunction · 0.85
execute_Method · 0.45
pushMethod · 0.45

Tested by

no test coverage detected