Skip to content
masterclass Buddy

React Testing Library · Matcher

toBeVisible

Use findByText to wait for text that appears after an action or delay. Await it, then assert the returned element, for example with toBeVisible.

Last updated

Syntax

await screen.findByText(text, options)

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

Subscribe
  • findByRole
  • getByRole
  • getByPlaceholderText
  • toBeVisible
  • @testing-library/jest-dom
  • userEvent

Source: Using findByText | Testing Library. Checked 2026-11-03.