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

Function waitForMicrotasks

packages/internal-test-utils/internalAct.js:29–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27export const thrownErrors: Array<mixed> = [];
28
29async function waitForMicrotasks() {
30 return new Promise(resolve => {
31 enqueueTask(() => resolve());
32 });
33}
34
35function aggregateErrors(errors: Array<mixed>): mixed {
36 if (errors.length > 1 && typeof AggregateError === 'function') {

Callers 8

actFunction · 0.70
waitForTasksAndTimersFunction · 0.70
serverActFunction · 0.70
AsyncClientComponentFunction · 0.50

Calls 2

enqueueTaskFunction · 0.70
resolveFunction · 0.50

Tested by 1

AsyncClientComponentFunction · 0.40