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

Function buildKeyPressEvent

src/event-builder/text.ts:21–26  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

19 * - Android: `{"key": "a"}`
20 */
21export function buildKeyPressEvent(key: string) {
22 return {
23 ...baseSyntheticEvent(),
24 nativeEvent: { key },
25 };
26}
27
28/**
29 * Experimental values:

Callers 2

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…