Testing Library | Testing Library (2024)

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

Testing Library | Testing Library (1)

Write Maintainable Tests

Tests only break when your app breaks, not implementation details

Testing Library | Testing Library (2)

Develop with Confidence

Interact with your app the same way as your users

Testing Library | Testing Library (3)

Accessible by Default

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

Testing Library | Testing Library (4)

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.

Testing Library | Testing Library (5)

Testing Library | Testing Library (6)

Guiding Principle

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

Who is Using This?

Testing Library | Testing Library (7)Testing Library | Testing Library (8)Testing Library | Testing Library (9)Testing Library | Testing Library (10)Testing Library | Testing Library (11)

More Testing Library Users

Awards

Testing Library | Testing Library (24)

Testing Library | Testing Library (25)

Testing Library | Testing Library (2024)
Top Articles
Latest Posts
Article information

Author: Dr. Pierre Goyette

Last Updated:

Views: 6585

Rating: 5 / 5 (50 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Dr. Pierre Goyette

Birthday: 1998-01-29

Address: Apt. 611 3357 Yong Plain, West Audra, IL 70053

Phone: +5819954278378

Job: Construction Director

Hobby: Embroidery, Creative writing, Shopping, Driving, Stand-up comedy, Coffee roasting, Scrapbooking

Introduction: My name is Dr. Pierre Goyette, I am a enchanting, powerful, jolly, rich, graceful, colorful, zany person who loves writing and wants to share my knowledge and understanding with you.