This website collects cookies to deliver better user experience
Vite - found the missing part
Vite - found the missing part
Vite is a build tool that aims to provide a faster and leaner development experience for modern web projects.
The meaning of vite comes to the French word for "quick" 🇫🇷.
I love 😍 vite but something was missing 😕. how to run tests?
Yesterday vitest was open source 🍾.
Vitest is a blazing fast new unit test framework powered by Vite.
Given Jest's massive adoption, Vitest provides a compatible API that allows you to replace Jest in most projects.
Vitest includes the most common features required when setting up your unit tests (mocking, snapshots, coverage).
Vitest cares a lot about performance and uses Worker threads to run as much as possible in parallel.
Lets take vitest for a ride 🏎.
First we create new vite project
pnpm create vite
lets add vitest
pnpm i -D vitest
in src directory we will add a test file App.test.js
we will add a simple test to check its works