Skip to content
masterclass Buddy

React Testing Library · Method

userEvent.type

userEvent.type simulates browser-like typing in a test. It handles focus, keyboard and input events, and value updates instead of dispatching just one event.

Last updated

Syntax

await user.type(element, text)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • userEvent.setup()
  • fireEvent
  • userEvent.click
  • screen.getByRole

Source: Introduction | Testing Library. Checked 2026-11-03.