React Testing Library · Method
userEvent.setup
userEvent.setup() creates a configured user-event session for browser-like interactions. Use its returned instance in a test so input state is shared across consecutive actions.
Last updated
Syntax
setup(options?: Options): UserEventIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
userEvent.click()userEvent.keyboard()fireEventadvanceTimerswriteToClipboard