MCPcopy Create free account
hub / github.com/dailydotdev/apps / swipe

Function swipe

packages/shared/src/components/shell/ReadingDrawer.spec.tsx:374–381  ·  view source on GitHub ↗
(to: { clientX: number; clientY: number })

Source from the content-addressed store, hash-verified

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);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected