Testing Library

A family of testing libraries that render components and query them the way users find them, by role, label and text.

In more detail

Queries such as getByRole("button", { name: "Save" }) rely on the accessibility tree, so tests double as accessibility checks. Its user-event package simulates realistic typing and clicking; Storybook play functions use it too.

Related terms

Taught in

References