MCPcopy
hub / github.com/callstack/react-native-testing-library / act

Function act

src/act.ts:71–73  ·  view source on GitHub ↗
(callback: () => T | Promise<T>)

Source from the content-addressed store, hash-verified

69const _act = withGlobalActEnvironment(reactAct) as ReactAct;
70
71export function act<T>(callback: () => T | Promise<T>): Promise<T> {
72 return _act(async () => await callback());
73}
74
75export { getIsReactActEnvironment, setIsReactActEnvironment as setReactActEnvironment };

Callers 15

waitForInternalFunction · 0.90
renderFunction · 0.90
rerenderFunction · 0.90
unmountFunction · 0.90
fireEventFunction · 0.90
dispatchEventFunction · 0.90
input.tsxFile · 0.85
expected.tsxFile · 0.85
input.tsxFile · 0.85
expected.tsxFile · 0.85
input.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected