src/chunk.js
/**
 * Runs all currently scheduled chunks.
 * Independent of errors it will unwind the queue. Will afterwards
 * throw the first encountered error.
 * @param {!Node|!./service/ampdoc-impl.AmpDoc} nodeOrAmpDoc
 */
Runs all currently scheduled chunks.
Independent of errors it will unwind the queue. Will afterwards
throw the first encountered error.
Runs all currently scheduled chunks . Independent of errors it will unwind the queue . Will afterwards throw the first encountered error .
function runChunksForTesting(nodeOrAmpDoc) {
  const service = chunkInstanceForTesting(nodeOrAmpDoc);
  const errors = [];
  while (true) {
    try {
      if (!service.execute_( null)) {
        break;
      }
    } catch (e) {
      errors.push(e);
    }
  }
  if (errors.length) {
    throw errors[0];
  }
}
function runChunksForTesting ( nodeOrAmpDoc ) { const service = chunkInstanceForTesting ( nodeOrAmpDoc ) ; const errors = [ ] ; while ( true ) { try { if ( ! service . execute_ ( null ) ) { break ; } } catch ( e ) { errors . push ( e ) ; } } if ( errors . length ) { throw errors [ 0 ] ; } }
Runs all currently scheduled chunks.
Runs all currently scheduled chunks .
/* idleDeadline */