Skip to main content
Version: v8

Testing Ionic React

This document provides an overview of how to test an application built with @ionic/react. It covers the basics of testing with React, as well as the specific tools and libraries developers can use to test their applications.

Introduction

Testing is an important part of the development process, and it helps to ensure that an application is working as intended. In @ionic/react, testing is done using a combination of tools and libraries, including Jest or Vitest, React Testing Library, Playwright or Cypress.

Types of Tests

There are two types of tests that can be written:

Unit Tests: Unit tests are used to test individual functions and components in isolation. Jest, Vitest and React Testing Library are commonly used for unit testing.

Integration Tests: Integration tests are used to test how different components work together. Cypress or Playwright are commonly used for integration testing.