MCPcopy
hub / github.com/facebook/react / waitForMicrotasks

Function waitForMicrotasks

packages/internal-test-utils/ReactInternalTestUtils.js:37–41  ·  packages/internal-test-utils/ReactInternalTestUtils.js::waitForMicrotasks
()

Source from the content-addressed store, hash-verified

35}
36
37export async function waitForMicrotasks() {
38 return new Promise(resolve => {
39 enqueueTask(() => resolve());
40 });
41}
42
43export async function waitFor(expectedLog, options) {
44 assertYieldsWereCleared(waitFor);

Callers 6

waitForFunction · 0.70
waitForAllFunction · 0.70
waitForThrowFunction · 0.70
unstable_waitForExpiredFunction · 0.70
waitForPaintFunction · 0.70
waitForDiscreteFunction · 0.70

Calls 2

enqueueTaskFunction · 0.70
resolveFunction · 0.50

Tested by

no test coverage detected