Testing Library

Testing Library

  • Docs
  • Recipes
  • Help
  • Blog
Project Logo

Testing Library

Simple and complete testing utilities that encourage good testing practices

Get Started

The more your tests resemble the way your software is used,
the more confidence they can give you.

Write Maintainable Tests

Tests only break when your app breaks, not implementation details

Develop with Confidence

Interact with your app the same way as your users

Accessible by Default

Built-in selectors find elements the way users do to help you write inclusive code

The problem (picture of a question mark)

The Problem

  • You want tests for your UI that avoid including implementation details and rather focus on making your tests give you the confidence for which they are intended.
  • You want your tests to be maintainable so refactors (changes to implementation but not functionality) don't break your tests and slow you and your team down.

The Solution

The Testing Library family of libraries is a very light-weight solution for testing without all the implementation details. The main utilities it provides involve querying for nodes similarly to how users would find them. In this way, testing-library helps ensure your tests give you confidence in your UI code.

The solution (picture of a star)
The guiding principle (picture of a brick wall)

Guiding Principle

The more your tests resemble the way your software is used, the more confidence they can give you.

Who is Using This?

PayPalWalmart LabsTillerCodecademyAutodeskSweepbrightTravelPerkVelo PaymentsParsley HealthFacebook Open SourceExpedia GroupWix.comTestsigmaintelliHRQuizletRadityGlobal CTO ForumGustoiFood
More Testing Library Users

React Testing Library

Cypress Testing Library

Testcafe Testing Library

Svelte Testing Library

Vue Testing Library

Angular Testing Library

ReasonReact Testing Library

Puppeteer Testing Library

React Native Testing Library

Preact Testing Library

Nightwatch Testing Library

And more...

Testing Library
Docs
Getting StartedExamplesAPIHelp
Community
BlogStack OverflowDiscord
More
StarGitHubEdit Docs on GitHubHosted by Netlify
Copyright © 2018-2020 Kent C. Dodds and contributors