question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Having trouble getting my options with fireEvent

See original GitHub issue

I have a very specific use case where I am needing an event to reach my code. When I do the following

fireEvent.pointerDown(domElement, {
      button: MouseButton.Primary,
      clientX: 5,
      clientY: 5,
    });

I receive the event but event.button, clientX and clientY are all undefined. Am I making a stupid mistake?

------------ 👆 Click “Preview”!

Issues on GitHub are intended to be related to problems with the library itself and feature requests so we recommend not using this medium to ask them here 😁.


❓ Support Forums

ISSUES WHICH ARE QUESTIONS WILL BE CLOSED

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Considerations for fireEvent | Testing Library
Based on the Guiding Principles, your test should resemble how users interact with your code (component, page, etc.) as much as possible. With ......
Read more >
react-testing-library - fireEvent.select() not working
The component I am testing has a dropdown menu that is only exposed when the input is focused on, but it seems like...
Read more >
How to use the @testing-library/dom.findByText function in ...
To help you get started, we've selected a few @testing-library/dom. ... focus(input); type(input, option); fireEvent.change(input, { target: { value: option } ...
Read more >
Having trouble getting my options with fireEvent - Bountysource
I have a very specific use case where I am needing an event to reach my code. When I do the following fireEvent.pointerDown(domElement ......
Read more >
React Testing Library and the “not wrapped in act” Errors
Why do I get this error? In test, the code to render and update React components need to be included in React's call...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found