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

Function logEvent

src/test-utils/events.ts:8–17  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

6export function createEventLogger() {
7 const events: EventEntry[] = [];
8 const logEvent = (name: string) => {
9 return (event: unknown) => {
10 const eventEntry: EventEntry = {
11 name,
12 payload: event,
13 };
14
15 events.push(eventEntry);
16 };
17 };
18
19 return { events, logEvent };
20}

Callers 14

longPress.test.tsxFile · 0.50
press.test.tsxFile · 0.50
type.test.tsxFile · 0.50
handleChangeTextFunction · 0.50
ManagedTextInputFunction · 0.50
paste.test.tsxFile · 0.50

Calls

no outgoing calls

Tested by 7

handleChangeTextFunction · 0.40
ManagedTextInputFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…