MCPcopy Create free account
hub / github.com/adobe/react-spectrum / event

Function event

packages/react-aria/test/searchfield/useSearchField.test.js:62–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 let onSubmit = jest.fn();
61 let onKeyDown = jest.fn();
62 let event = key => ({
63 key,
64 nativeEvent: {
65 isComposing: false
66 },
67 preventDefault,
68 stopPropagation,
69 target: {},
70 currentTarget: {contains: () => true}
71 });
72
73 afterEach(() => {
74 preventDefault.mockClear();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected