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

Function buildTextChangeEvent

src/event-builder/text.ts:9–14  ·  view source on GitHub ↗
(text: string, { start, end }: TextRange)

Source from the content-addressed store, hash-verified

7 * - Android: `{"eventCount": 6, "target": 53, "text": "Tes"}`
8 */
9export function buildTextChangeEvent(text: string, { start, end }: TextRange) {
10 return {
11 ...baseSyntheticEvent(),
12 nativeEvent: { text, target: 0, eventCount: 0, selection: { start, end } },
13 };
14}
15
16/**
17 * Experimental values:

Callers 3

pasteFunction · 0.90
emitTypingEventsFunction · 0.90
text.test.tsFile · 0.90

Calls 1

baseSyntheticEventFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…