From the course: Testing in React with Vitest
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Introduction to Vitest - React.js Tutorial
From the course: Testing in React with Vitest
Introduction to Vitest
- [Instructor] In this video, we'll cover why use Vitest of Jest and what are some of the ways you and your team can harness Vitest's power. Vitest is a framework agnostic, next generation testing framework powered by Vite. It was created and is actively maintained by Anthony Fu. It can be used for testing, unit tests, snapshot tests, as well as a general purpose framework for running independent tests. Vitest can be used in place of Jest, well, why? Well, Vite is async by default. This working with Jest a bit tricky since by the time of recording this, Jest does not support async transformation and does not have ESM support. This means if you want to test alongside your application, you must duplicate your pipelines and maintain two configurations, which is prone to misalignments. This can create a rift between testing and development teams. Jest is not built for ES module native applications. It's built for transpired applications. There are various use cases where we can use Vitest…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.