React Testing Library · Method
userEvent.hover
userEvent.hover(element) simulates moving the pointer onto an element. Await it, then check the UI behavior caused by hovering.
Last updated
Syntax
hover(element: Element): Promise<void>In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
userEvent.setupuserEvent.unhoveruserEvent.clickuserEvent.dblClickuserEvent.tripleClickuserEvent.pointer