Skip to content
masterclass Buddy

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.

Subscribe
  • userEvent.setup
  • userEvent.unhover
  • userEvent.click
  • userEvent.dblClick
  • userEvent.tripleClick
  • userEvent.pointer

Source: Convenience APIs | Testing Library. Checked 2026-11-03.