React Testing Library · Method
fireEvent.click
fireEvent.click dispatches a click event on a DOM node. It is useful for simple event tests, but user-event is usually better for simulating user interactions.
Last updated
Syntax
fireEvent.click(node, eventProperties)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
fireEventfireEvent[eventName]createEvent[eventName]@testing-library/user-event