Skip to content
masterclass Buddy

React Testing Library · Matcher

toBeEnabled

toBeEnabled is a DOM matcher for checking that an element is enabled. The supplied official Testing Library page documents the related toBeDisabled matcher, but does not directly document toBeEnabled.

Last updated

Syntax

expect(element).toBeEnabled()

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

Subscribe
  • toBeDisabled
  • screen.getByRole
  • @testing-library/jest-dom
  • userEvent

Source: Example | Testing Library. Checked 2026-11-03.