Jest, Vitest & Testing Library
Write fast, trustworthy unit, integration and component tests for TypeScript frontends with Jest or Vitest, Mock Service Worker and Testing Library.
Start course →
What you'll learn
- Choose between Jest and Vitest and configure either one for a TypeScript frontend project.
- Write clear, isolated tests with the arrange-act-assert shape and the right matchers.
- Test asynchronous code, timers, dates and randomness deterministically.
- Mock functions, modules and network requests (with MSW) without coupling tests to implementation details.
- Test React components the way users use them with Testing Library queries and user-event.
- Keep a test suite fast, trustworthy and useful in CI with coverage, debugging and sharding.