Skip to content
ViraStack
Products
Academy
New
About
Search docs
⌘K
Home
Sources
Contribute
Academy
Vitest
Component testing with React Testing Library and MSW.
Getting Started
01
Introduction
6 Docs
1 Article
1 Video
What is frontend testing? Which tools are used?
02
Setup
8 Docs
1 Repo
Installing Vitest, jsdom and React Testing Library.
03
Basics
4 Docs
1 Repo
The first test, render, expect and matchers.
04
Product card
Project
4 Docs
1 Repo
A step-by-step test for an e-commerce product card.
Component Testing
05
Queries
6 Docs
1 Article
1 Video
getBy, queryBy, findBy and query priority.
06
User interaction
8 Docs
1 Article
1 Repo
userEvent, a search box and a coupon form.
07
Asynchronous tests
8 Docs
1 Article
2 Repos
findBy, waitFor and fake timers.
08
Product list
Project
5 Docs
The loading, search and add-to-cart flow.
Advanced Use
09
Mock
10 Docs
1 Article
1 Video
vi.fn, vi.mock and mocking an API with MSW.
10
Provider and hook
3 Docs
2 Articles
The cart Provider, renderWithProviders and renderHook.
11
Debugging
10 Docs
5 Articles
2 Repos
screen.debug, the common errors and coverage.
12
Cart flow
Project
7 Docs
1 Repo
A full flow test from the product list to the cart.
Previous track
Forms
Next track
Playwright