(to: { clientX: number; clientY: number })
| 372 | fireEvent.click(screen.getByText('Read post')); |
| 373 | |
| 374 | const swipe = (to: { clientX: number; clientY: number }) => { |
| 375 | fireEvent.touchStart(window, { |
| 376 | touches: [{ clientX: 100, clientY: 500 }], |
| 377 | }); |
| 378 | const allowed = fireEvent.touchMove(window, { touches: [to] }); |
| 379 | fireEvent.touchEnd(window, { touches: [] }); |
| 380 | return allowed; |
| 381 | }; |
| 382 | |
| 383 | expect(swipe({ clientX: 160, clientY: 490 })).toBe(true); |
| 384 | expect(swipe({ clientX: 102, clientY: 450 })).toBe(false); |
no outgoing calls
no test coverage detected