MCPcopy Index your code
hub / github.com/adobe/react-spectrum / pointerEvent

Function pointerEvent

packages/react-aria/test/interactions/usePress.test.js:42–58  ·  view source on GitHub ↗
(type, opts)

Source from the content-addressed store, hash-verified

40}
41
42function pointerEvent(type, opts) {
43 let evt = new Event(type, {bubbles: true, cancelable: true, composed: true});
44 Object.assign(
45 evt,
46 {
47 ctrlKey: false,
48 metaKey: false,
49 shiftKey: false,
50 altKey: false,
51 button: opts.button || 0,
52 width: 1,
53 height: 1
54 },
55 opts
56 );
57 return evt;
58}
59
60describe('usePress', function () {
61 beforeAll(() => {

Callers 1

usePress.test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected