MCPcopy Index your code
hub / github.com/callstack/react-native-testing-library / wait

Function wait

src/user-event/utils/wait.ts:6–16  ·  view source on GitHub ↗
(config: WaitConfig, durationInMs?: number)

Source from the content-addressed store, hash-verified

4};
5
6export function wait(config: WaitConfig, durationInMs?: number) {
7 const delay = durationInMs ?? config.delay;
8 if (typeof delay !== 'number' || delay == null) {
9 return;
10 }
11
12 return Promise.all([
13 new Promise<void>((resolve) => globalThis.setTimeout(() => resolve(), delay)),
14 config.advanceTimers(delay),
15 ]);
16}

Callers 10

clearFunction · 0.90
pasteFunction · 0.90
wait.test.tsFile · 0.90
methodFunction · 0.90
emitDirectPressEventsFunction · 0.90
typeFunction · 0.90
emitTypingEventsFunction · 0.90
emitDragScrollEventsFunction · 0.90
emitMomentumScrollEventsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…