React Testing Library · Method
userEvent.clear
userEvent.clear removes all content from an editable element. It focuses the element, selects its contents, and deletes them.
Last updated
Syntax
clear(element: Element): Promise<void>In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
userEvent.setupselectOptionsdeselectOptionstypeupload