MCPcopy Create free account
hub / github.com/ampproject/amphtml / waitForDiscover

Function waitForDiscover

test/unit/core/context/test-node-subscribers.js:94–103  ·  view source on GitHub ↗
(...nodesOrContextNodes)

Source from the content-addressed store, hash-verified

92 }
93
94 function waitForDiscover(...nodesOrContextNodes) {
95 const contextNodes = nodesOrContextNodes.map((arg) =>
96 arg.nodeType ? ContextNode.get(arg) : arg
97 );
98 const promises = contextNodes.map((contextNode) =>
99 discoverWrapper.waitFor(contextNode)
100 );
101 clock.tick(1);
102 return Promise.all(promises);
103 }
104
105 function rediscover(...nodesOrContextNodes) {
106 const contextNodes = nodesOrContextNodes.map((arg) =>

Callers 1

Calls 3

waitForMethod · 0.80
tickMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected