Published on

Simplify Testing with React Testing Library

2 min read | 340 words
Authors
Author Scottie Crump with Book

I recently worked with Packt Publishing to write a book about testing React components with React Testing Library!

Book Description

React Testing Library (RTL) is a lightweight and easy-to-use tool for testing the document object model (DOM) output of components. This book will show you how to use this modern tool to test React components, reducing the risk that your application will not work as expected in production.

The book demonstrates how to implement RTL quickly, focusing on the guiding principles of DOM Testing Library to write tests from the user's perspective. You'll explore the advantages of testing components from the perspective of end-users who will use your components. You will learn test-driven development (TDD) to drive the process of writing tests. In addition, you will also learn how to write user interface (UI) end-to-end tests using the popular Cypress library. Throughout this book, you'll work with practical examples and valuable explanations to confidently create tests that don't fail with code changes.

By the end of this React book, you will have learned all you need to test React components confidently.

Who this book is for

This book is for software engineers, quality engineers and anyone who wants to learn about modern practices used for testing React components using the latest testing tool, RTL. Basic knowledge of React development is required to get the most out of this book.

Video Walk Through

Where to Purchase

You can purchase the book on Amazon in print or Kindle version or through Packt Publishing's website!