Skip to content
masterclass Buddy

React Testing Library · Pipe

container

React Testing Library’s render mounts a React element and returns queries plus helpers for inspecting, updating, and removing it. Use semantic queries, usually through screen, instead of selecting elements by implementation details.

Last updated

Syntax

function render(ui: React.ReactElement<any>, options?: RenderOptions): RenderResult

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

Subscribe
  • screen
  • getByRole
  • findBy
  • queryBy
  • rerender
  • unmount
  • asFragment
  • cleanup

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