vitest-dev/vitest
Next generation testing framework powered by Vite.
What it is
Vite's config, transformers, resolvers, and plugins. Use the same setup from your app! Jest Snapshot Chai built-in for assertions, with Jest expect compatible APIs Smart & instant watch mode, like HMR for tests! Native code coverage via v8 or istanbul. Jest-compatible mocking, stubbing, and spies. JSDOM and happy-dom for DOM and browser API mocking Browser Mode for running component tests in the browser Components testing (Vue, React, Svelte, Lit, Marko) Benchmarking support with Tinybench Projects support expect-type for type-level testing ESM first, top level await Out-of-box TypeScript / JSX support Filtering, timeouts, concurrent for suite and tests Sharding support Reporting Uncaught…
When to use it
Reach for vitest when you need tests, end-to-end browser automation, linting or formatting — it's written in TypeScript and fits stacks tagged test, testing-tools, vite.