Testing Library

Simple and complete testing utilities that encourage good testing practices

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?

AutodeskCodecademyExpedia GroupFacebook Open SourceGustoPayPalWalmart LabsCoches.netInfojobsZup I.T. Innovation
More Testing Library Users