Vitest
- Category
- Frameworks and libraries
- Docs outline
- 13 sections
Official docs outline
vitest.dev- Why Vitest
Vite-powered test runner, Jest compatibility and design goals.
- Getting started
Installing, configuration, and running tests.
- Writing tests
test, describe, expect and organization.
- Using matchers
expect assertions and matchers.
- Testing async code
Promises, async/await and resolves/rejects.
- Setup and teardown
beforeEach, afterEach, beforeAll and afterAll hooks.
- Mocking
vi.fn, vi.mock, spies, timers, dates and modules.
- Snapshot testing
toMatchSnapshot, inline snapshots and updating.
- Test context and lifecycle
Test fixtures with test.extend and run lifecycle.
- Environments and projects
jsdom, happy-dom, node environments, and test projects.
- Coverage
v8 and istanbul coverage providers and thresholds.
- Browser mode
Running tests in real browsers and component testing.
- CLI, filtering and debugging
Watch mode, filtering, reporters and debugging.
Each section links to the official page. Titles and summaries by Extra Credit; the docs belong to their authors.