-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Full Stack Development with Spring Boot 3 and React
By :

Vitest (https://vitest.dev/) is the testing framework for Vite projects. It is also possible to use Jest in Vite projects, and there are libraries that provide Vite integration for Jest (for example, https://github.com/sodatea/vite-jest). In this book, we will use Vitest because it is easier to start using it with Vite. Vitest is similar to Jest, and it provides test
, describe
, and expect
, which we learned about in the Jest section.
In this section, we will create tests with Vitest and the React Testing Library for the frontend project that we used in Chapter 14, Styling the Frontend with MUI.
The first step is installing Vitest and the React Testing Library to our project:
npm
command inside your project folder:
npm install -D vitest @testing-library/react @testing-library/jest-
dom jsdom
The -D...