React Hero: TypeScript + Jest + React Testing Library setup

Thi Tran
TinySo
Published in
5 min readOct 16, 2022

--

Welcome back to my React Hero series. Today, we’re going to setup testing for our React TypeScript application using Jest and React Testing Library (RTK).

The React Hero series will be covering the following topics:

  1. Setup a new React application with Vite + TypeScript
  2. Setup React application with a design system — Material UI
  3. Setup Jest + React Testing Library
  4. Setup ESlint + Prettier in React
  5. React Router
  6. React Form Handling + Validation
  7. Setup Redux Tool Kits & RTK Query
  8. Build + Deploy your React application to your own server
  9. Setup CI/CD pipeline for React app using GitlabCI
  10. And more…

Okay, let’s finish the Step #3 today!

Why do we need testing?

For developers who are not familiar with testing before, testing is a very important step that helps you to check & verify problems before deploying your application to end users on production.

While writing testing for functionalities, we could be able to see which logic is missing and correct it accordingly. More importantly, when…

--

--

Thi Tran
TinySo
Editor for

I’m a software engineer. I love programming, writing & sharing.