Dev Resources
Testing Library favicon

Testing Library

Testing

Simple and complete testing utilities that encourage good testing practices.

Testing Library's website screenshot

About Testing Library

Testing Library is a family of testing utilities for UI code, designed to query DOM nodes the way users would find them rather than relying on implementation details. This approach aims to keep tests stable across refactors, since tests only fail when the application's behavior changes rather than its internal implementation.

The library provides built-in selectors that promote accessible markup by finding elements the same way assistive technologies and users do. It is used with a range of frontend frameworks and testing tools, including React, Vue, Angular, Svelte, Preact, ReasonReact, and React Native, as well as testing tools such as Cypress, Puppeteer, TestCafe, and Nightwatch.

The project is open source, maintained by Kent C. Dodds and contributors, with documentation, examples, and community support available through Stack Overflow and Discord.

Key features

  • Query DOM elements the same way users find them, favoring accessible selectors
  • Avoids testing implementation details so refactors don't break tests
  • Family of libraries with bindings for React, Vue, Angular, Svelte, Preact, ReasonReact, and React Native
  • Integrates with testing tools like Cypress, Puppeteer, Testcafe, and Nightwatch

Frequently asked questions

Is Testing Library free?

The page does not state pricing, but it is an open-source project hosted on GitHub.

What frameworks does Testing Library support?

It supports React, Vue, Angular, Svelte, Preact, ReasonReact, and React Native.

Who is Testing Library for?

It's for developers writing UI tests who want their tests to resemble how users actually interact with the software.

Does it work with other testing tools?

Yes, it integrates with tools like Cypress, Puppeteer, Testcafe, and Nightwatch.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • CoreClaw favicon

Show your product to thousands of developers

ยท 100k monthly pageviews
ยท 7k newsletter subscribers

Advertise your product

You might also like