React Testing Library · Function
fireEvent
fireEvent dispatches DOM events on elements in tests. Use event-specific helpers such as click, change, and keyDown for common cases.
Last updated
Syntax
fireEvent(node: HTMLElement, event: Event)
fireEvent[eventName](node: HTMLElement, eventProperties: Object)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
createEventfireEvent[eventName]@testing-library/user-eventfireEvent.changefireEvent.clickfireEvent.keyDown