React Testing Library · Matcher
toHaveDisplayValue
Finds an input, textarea, or select by the value currently shown in the control. Use screen.getByDisplayValue after rendering a React component.
Last updated
Syntax
getByDisplayValue(value, options?)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
queryByDisplayValuegetAllByDisplayValuequeryAllByDisplayValuefindByDisplayValuefindAllByDisplayValuescreenrender