Skip to content
masterclass Buddy

React Testing Library · Method

userEvent.deselectOptions

Removes selected options from an HTML select or listbox. You can identify options by value, text, or element, and remove several at once.

Last updated

Syntax

deselectOptions(element, values): Promise<void>

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

Subscribe
  • selectOptions
  • clear
  • type
  • upload

Source: Utility APIs | Testing Library. Checked 2026-11-03.