The Origin Story
Vitest was created by Anthony Fu, one of the most prolific open-source developers in the Vue and Vite ecosystem. Fu is also the creator of Slidev, UnoCSS, and dozens of other widely-used tools, and he's a core team member of both Vue.js and Vite. He started building Vitest in late 2021, motivated by a fundamental disconnect: Vite had revolutionized the development server by using native ES modules and esbuild for blazing-fast hot module replacement, but when it came time to run tests, developers had to fall back to Jest, which used a completely different module resolution system based on CommonJS and the Node.js vm module. This meant maintaining two separate build configurations and dealing with constant compatibility issues between your dev environment and your test environment.
Fu's insight was to build a test runner that ran on top of Vite's own transform pipeline, so test code would be processed identically to application code.
Vitest reached version 1.0 in December 2023 and was immediately endorsed by the Vite team as the recommended testing solution. The project is maintained under the vite-ecosystem umbrella and receives financial backing through the Vite project's sponsors.
Why Developers Love It
The speed difference between Vitest and Jest is not marginal, it is transformational. On a typical project with hundreds of test files, Vitest's initial run might be 5-10 times faster because it avoids the vm sandbox overhead and uses Vite's native ESM transform cache. But the real killer feature is the watch mode: Vitest tracks module dependencies through Vite's module graph, so when you edit a file, only the tests that import that file (directly or transitively) get re-run. Jest re-runs tests based on file change detection but still needs to re-process the entire module graph for each test file. Vitest also offers first-class TypeScript support with no configuration, your tsconfig paths, decorators, and JSX transforms just work because they're already configured in Vite. The in-source testing feature lets you write tests directly inside your source files using a special import.meta.vitest block, which gets tree-shaken out of production builds. It's a surprisingly natural way to co-locate tests with the code they cover, especially for utility functions and pure logic modules.
Visit: vitest.dev