(type, opts)
| 29 | import userEvent from '@testing-library/user-event'; |
| 30 | |
| 31 | function pointerEvent(type, opts) { |
| 32 | let evt = new Event(type, {bubbles: true, cancelable: true}); |
| 33 | Object.assign( |
| 34 | evt, |
| 35 | { |
| 36 | ctrlKey: false, |
| 37 | metaKey: false, |
| 38 | shiftKey: false, |
| 39 | altKey: false, |
| 40 | button: opts.button || 0, |
| 41 | width: 1, |
| 42 | height: 1 |
| 43 | }, |
| 44 | opts |
| 45 | ); |
| 46 | return evt; |
| 47 | } |
| 48 | |
| 49 | describe('useDrag and useDrop', function () { |
| 50 | let user; |