Skip to content
masterclass Buddy

React Testing Library · Method

userEvent.paste

userEvent.paste simulates pasting text or clipboard data into the document. It can use supplied data or read from the Clipboard.

Last updated

Syntax

paste(clipboardData?: DataTransfer | string): Promise<void>

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

Subscribe
  • userEvent.setup()
  • copy()
  • cut()
  • Clipboard API

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