Enable javascript in your browser for better experience. Need to know to enable it? Go here.

React Testing Library

Last updated : May 19, 2020
Not on the current edition
This blip is not on the current edition of the Radar. If it was on one of the last few editions it is likely that it is still relevant. If the blip is older it might no longer be relevant and our assessment might be different today. Unfortunately, we simply don't have the bandwidth to continuously review blips from previous editions of the Radar Understand more
May 2020
Adopt ?

The JavaScript world moves pretty fast, and as we gain more experience using a framework our recommendations change. The React Testing Library is a good example of a framework that with deeper usage has eclipsed the alternatives to become the sensible default when testing React-based frontends. Our teams like the fact that tests written with this framework are less brittle than with alternative frameworks such as Enzyme, because you're encouraged to test component relationships individually as opposed to testing all implementation details. This mindset is brought by Testing Library which React Testing Library is part of and which provides a whole family of libraries for Angular and Vue.js, for example.

Nov 2019
Trial ?

The JavaScript world moves pretty fast, and as we gain more experience using a framework our recommendations change. The React Testing Library is a good example of a framework that with deeper usage has eclipsed the alternatives to become the sensible default when testing React-based frontends. Our teams like the fact that tests written with this framework are less brittle than with alternative frameworks such as Enzyme because you're encouraged to test component relationships individually as opposed to testing all implementation details.

Apr 2019
Assess ?

As the pace of change in JavaScript frameworks has slowed, our teams have more time to work with specific frameworks and are gaining deeper insights as a result. With React and the dominant testing framework, Enzyme, we've observed a worrying trend of unit tests becoming tightly coupled to implementation details without providing — because the focus is on shallow details — much confidence that features work as expected. These unit tests make evolving the design difficult and they shift too much responsibility up the test pyramid to functional testing. This has made us revisit the idea of subcutaneous testing. Additionally, because of its design, Enzyme has issues trying to keep up with React's development. All this has pushed us toward assessing react-testing-library as a new framework for testing React applications.

Veröffentlicht : Apr 24, 2019

Download the PDF

 

 

English | Español | Português | 中文

Sign up for the Technology Radar newsletter

 

Subscribe now

Visit our archive to read previous volumes