OSS Tanbou

Vitest — fast testing that reuses the Vite transform and configuration stack

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
17,128
Primary language
TypeScript
License
MIT
Repository last updated
Sep 20, 2026

Overview

Vitest is a JavaScript and TypeScript testing framework that reuses Vite configuration, transforms, resolvers, and plugins. It combines Jest-compatible expect and mocking APIs with snapshots, watch mode, V8/Istanbul coverage, Browser Mode, and component testing.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Reuse the Vite configuration and transform pipeline

Tests can use the same Vite plugins, TypeScript/JSX transforms, and configuration as the application, reducing duplicate test-build setup.

Sources: [2][4]

Cover unit, snapshot, browser, and component testing

Vitest includes Jest-compatible assertions and mocks, snapshots, coverage, Browser Mode, and component-testing support for common frontend frameworks.

Sources: [2]

For fast feedback in Vite-based frontends and TypeScript packages

Vitest suits projects that want fast watch-mode feedback and a common toolchain spanning unit through browser/component tests.

Sources: [2][4]

Check Node/Vite versions and the exact Jest compatibility surface

The README requires Vite 6.4.0+ and Node 22.12.0+. Its Jest compatibility is broad but not a complete drop-in guarantee, so migration should validate environment and API differences.

Sources: [2][4]

Official sources

  1. [1]vitest-dev/vitest repository(2026-09-20)
  2. [2]Vitest README(2026-09-20)
  3. [3]Vitest MIT license(2026-09-20)
  4. [4]Vitest documentation(2026-09-20)
Supplemental curator note

Vitest is particularly convenient in Vite projects because tests can reuse the application's transforms, configuration, and plugins instead of maintaining a separate test compilation stack. The current README requires Vite 6.4.0+ and Node 22.12.0+, so verify runtime versions before adoption.

Try it in 3 steps

  1. 1

    Install Vitest in a minimal project

    Use a disposable project with Node 22.12.0+ and add Vitest as a dev dependency.

    mkdir vitest-demo && cd vitest-demo && npm init -y && npm install -D vitest
  2. 2

    Create one test file

    Create a minimal unit test using the Vitest test and expect APIs.

    printf "import { expect, test } from 'vitest'\ntest('adds', () => expect(1 + 1).toBe(2))\n" > sum.test.js
  3. 3

    Run the test once

    Use a single run first to verify test discovery and execution.

    npx vitest run
Check the official README

Growth

Growth trends · Last 30 days

17,128 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
90
Open PRs
82
Issues opened
154
Issues closed
133
PRs opened
487
PRs merged
320

Issues

154 / 133

Jun 23Sep 20
Issues openedIssues closed

Pull requests

487 / 320

Jun 23Sep 20
PRs openedPRs merged

Maintenance

Median first response
9.2 hr
Issue response rate
48.4% (46/95)

Based on up to the 100 newest issues opened by external users in the last 90 days. A first comment from an OWNER, MEMBER, or COLLABORATOR counts as a response; issues whose full comment history cannot be checked are excluded. The median and response rate update weekly.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • vite
  • test
  • testing-tools
Stars
17,128
Forks
2,011
Watchers
64
Open issues
342
Contributors
460
Primary language
TypeScript
License
MIT
Repository last updated
Sep 20, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.