react-testing-library logo

react-testing-library

A lightweight solution for testing React components
31
17
+ 1
0

What is react-testing-library?

It is a simple and complete React DOM testing utility that encourage good testing practices. It provides light utility functions on top of react-dom and react-dom/test-utils, in a way that encourages better testing practices.
react-testing-library is a tool in the Testing Frameworks category of a tech stack.
react-testing-library is an open source tool with 10.7K GitHub stars and 572 GitHub forks. Here鈥檚 a link to react-testing-library's open source repository on GitHub

Who uses react-testing-library?

Companies
11 companies reportedly use react-testing-library in their tech stacks, including all, Captiv8 Javascript, and commercetools.

Developers
19 developers on StackShare have stated that they use react-testing-library.

react-testing-library Integrations

Why developers like react-testing-library?

Here鈥檚 a list of reasons why companies and developers use react-testing-library
Top Reasons
Be the first to leave a pro
react-testing-library Reviews

Here are some stack decisions, common use cases and reviews by companies and developers who chose react-testing-library in their tech stack.

Bryam Rodriguez
Bryam Rodriguez
JavaScript
JavaScript
Bit
Bit
Python
Python
Next.js
Next.js
React Native
React Native
Redis
Redis
MongoDB
MongoDB
PostgreSQL
PostgreSQL
RSpec
RSpec
react-testing-library
react-testing-library
Jest
Jest
Create React App
Create React App
Redux
Redux
React
React
Rails
Rails
Ruby
Ruby

I'm working as one of the engineering leads in RunaHR. As our platform is a Saas, we thought It'd be good to have an API (We chose Ruby and Rails for this) and a SPA (built with React and Redux ) connected. We started the SPA with Create React App since It's pretty easy to start.

We use Jest as the testing framework and react-testing-library to test React components. In Rails we make tests using RSpec.

Our main database is PostgreSQL, but we also use MongoDB to store some type of data. We started to use Redis 聽for cache and other time sensitive operations.

We have a couple of extra projects: One is an Employee app built with React Native and the other is an internal back office dashboard built with Next.js for the client and Python in the backend side.

Since we have different frontend apps we have found useful to have Bit to document visual components and utils in JavaScript.

See more
Esther Breslauer
Esther Breslauer
react-testing-library
react-testing-library

Hi, I am starting out to test an application that is currently being developed - FE: React. BE: Node JS. I want the framework to be able to test all UI scenarios (from simple to complex) and also have the capability to test APIs. I also need to run tests across all OSs and Browsers (Windows, Mac, Android, iOS). I have also looked into react-testing-library and @TestProject.io. Any advice you can give as to which framework would be best and why would be so much appreciated! Thank you!!

See more

react-testing-library's Features

  • light-weight solution for testing
  • React DOM testing utilities
  • works with any environment that provides DOM APIs

react-testing-library Alternatives & Comparisons

What are some alternatives to react-testing-library?
react-testing-library
It is a simple and complete React DOM testing utility that encourage good testing practices. It provides light utility functions on top of react-dom and react-dom/test-utils, in a way that encourages better testing practices.
Enzyme
Enzyme is a JavaScript Testing utility for React that makes it easier to assert, manipulate, and traverse your React Components' output.
Cypress
Cypress is a front end automated testing application created for the modern web. Cypress is built on a new architecture and runs in the same run-loop as the application being tested. As a result Cypress provides better, faster, and more reliable testing for anything that runs in a browser. Cypress works on any front-end framework or website.
JUnit
JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.
Cucumber
Cucumber is a tool that supports Behaviour-Driven Development (BDD) - a software development process that aims to enhance software quality and reduce maintenance costs.
See all alternatives

react-testing-library's Followers
17 developers follow react-testing-library to keep up with related blogs and decisions.
chrislukkk
thanh4890
Matthias Heyman
Tianyi Wang
Robert Flinton
Christian Fleschhut
contactfoaix
Joon Lee
Andrew Mueller
Grantholomaeus