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

Method getDeferBlocks

packages/core/testing/src/defer.ts:58–72  ·  view source on GitHub ↗

* Retrieves all nested child defer block fixtures * in a given defer block.

()

Source from the content-addressed store, hash-verified

56 * in a given defer block.
57 */
58 getDeferBlocks(): Promise<DeferBlockFixture[]> {
59 const deferBlocks: DeferBlockDetails[] = [];
60 // An LContainer that represents a defer block has at most 1 view, which is
61 // located right after an LContainer header. Get a hold of that view and inspect
62 // it for nested defer blocks.
63 const deferBlockFixtures = [];
64 if (this.block.lContainer.length >= CONTAINER_HEADER_OFFSET) {
65 const lView = this.block.lContainer[CONTAINER_HEADER_OFFSET];
66 getDeferBlocks(lView, deferBlocks);
67 for (const block of deferBlocks) {
68 deferBlockFixtures.push(new DeferBlockFixture(block, this.componentFixture));
69 }
70 }
71 return Promise.resolve(deferBlockFixtures);
72 }
73}
74
75function hasStateTemplate(state: DeferBlockState, block: DeferBlockDetails) {

Callers

nothing calls this directly

Calls 3

resolveMethod · 0.65
getDeferBlocksFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected