Skip to content

Commit 9402483

Browse files
committed
docs: rework intro sections
1 parent be213de commit 9402483

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

docs/react/testing/introduction.md

+16-8
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,31 @@ This document provides an overview of how to test an application built with `@io
1010

1111
## Introduction
1212

13-
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, React Testing Library, and Cypress.
13+
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 Vitest, Jest, React Testing Library, Playwright or Cypress.
14+
15+
## Types of Tests
16+
17+
There are two types of tests that can be written:
18+
19+
**Unit Tests**: Unit tests are used to test individual functions and components in isolation. They are typically written using [Jest](https://jestjs.io) and [React Testing Library](https://testing-library.com) or [Vitest](https://vitest.dev).
20+
21+
**Integration Tests**: Integration tests are used to test how different components work together. They are typically written using [Cypress](https://www.cypress.io) or [Playwright](https://playwright.dev).
1422

1523
## Tools and Libraries
1624

17-
**Jest**: Jest is a popular testing framework for JavaScript applications. It's used to run unit tests and integration tests.
25+
### Unit Testing
1826

19-
**React Testing Library**: React Testing Library is a set of utilities that make it easier to test React components. It's used to interact with components and test their behavior.
27+
[**Jest**](https://jestjs.io): Jest is a popular testing framework for JavaScript applications. It is included with `react-scripts` and is used to run unit tests.
2028

21-
**Cypress**: Cypress is a modern testing tool that's used to run end-to-end tests. It allows developers to test the entire application, including the user interface, in a simulated environment.
29+
[**Vitest**](https://vitest.dev): Vitest is a modern testing framework powered by Vite. It is compatible with Jest and is used to run unit tests.
2230

23-
## Types of Tests
31+
[**React Testing Library**](https://testing-library.com): React Testing Library is a set of utilities that make it easier to test React components. It's used to interact with components and test their behavior.
2432

25-
There are two types of tests that can be written:
33+
### Integration Testing
2634

27-
**Unit Tests**: Unit tests are used to test individual functions and components in isolation. They are typically written using Jest and React Testing Library.
35+
[**Cypress**](https://www.cypress.io): Cypress is a modern testing tool that's used to run end-to-end tests. It allows developers to test the entire application, including the user interface, in a simulated environment.
2836

29-
**Integration Tests**: Integration tests are used to test how different components work together. They are typically written using Cypress.
37+
[**Playwright**](https://playwright.dev): Playwright is a browser automation library that's used to run end-to-end tests. It allows developers to test the entire application, including the user interface, in a simulated environment.
3038

3139
## Conclusion
3240

0 commit comments

Comments
 (0)