How to Confidently Write Unit Tests using React Testing Library

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • Klotho - AWS Cloud-aware infrastructure-from-code toolbox [NEW]
  • Sonar - Write Clean JavaScript Code. Always.
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • testing-library-demo

    React Testing Library Demo

    Add the content from this link in the Register.jsx file and inside register.css file add contents from this link.

  • vite

    Next generation frontend tooling. It's fast!

    We will be using Vite which is the most popular and a faster alternative to create-react-app.

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • testing-library-docs

    docs site for @testing-library/*

    The React Testing Library has a set of packages that helps you test UI components in a user-centric way which means just like how the user interacts with the various elements displayed on the page.

  • react-hook-form

    📋 React Hooks for form state management and validation (Web + React Native)

    Also, instead of managing the state and onChange handler yourself, you can use a very popular react-hook-form library.

  • react-bootstrap

    Bootstrap components built with React

    We will use react-bootstrap to create the UI elements so we don't have to write all CSS from scratch.

  • jest

    Delightful JavaScript Testing.

    We cannot only use the testing library alone, but we also need to install Jest which exposes extensively used global expect function and other things which help to make assertions in our test cases.

  • Enzyme

    JavaScript Testing utilities for React

    So If you have experience with enzyme testing, where you might be checking the value of state once you click any button or you might be checking the prop value If something changes.

  • Klotho

    AWS Cloud-aware infrastructure-from-code toolbox [NEW]. Build cloud backends with Infrastructure-from-Code (IfC), a revolutionary technique for generating and updating cloud infrastructure. Try IfC with AWS and Klotho now (Now open-source)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts