-
Notifications
You must be signed in to change notification settings - Fork 468
Closed
Description
Hey, I'm maintaining react-use-gesture and heavily rely on testing-library for tests (thanks so much btw).
I'm planning to move to PointerEvent instead of a mix of TouchEvent and MouseEvent for our drag recognizer. Our set of tests implies creating events that simulate pointer coordinates in the form of { clientX: number, clientY: number }
.
DOM Testing Library
version: 7.5.1 (from yarn.lock, I'm using @testing-library/react)node
version: 12.16.1yarn
version: 1.22.4
Relevant code or config:
// this works
const event = createEvent.mouseMove(element, { clientX: 30, clientY: 80 })
console.log(event.clientX) // <-- prints 30
// this doesn't work
const event = createEvent.pointerMove(element, { clientX: 30, clientY: 80 })
console.log(event.clientX) // <-- prints undefined
I'll link to a repro as soon as codesandbox works properly.
Metadata
Metadata
Assignees
Labels
No labels