(type, opts)
| 40 | } |
| 41 | |
| 42 | function 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 | |
| 60 | describe('usePress', function () { |
| 61 | beforeAll(() => { |