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.
SubscribeRelated
userEvent.setup()copy()cut()Clipboard API