Skip to main content

Running Tests

Analog supports Vitest for running unit tests.

Vitest Features

Vitest supports many features:

  • A Jest-compatible API.
  • Supports Vite's config, transforms, resolvers, and plugins.
  • Smart & instant watch mode.
  • TypeScript support.
  • Jest-compatible snapshots.
  • jsdom for DOM mocking.
  • In-source testing.
  • And more ...

Running Unit Tests

To run unit tests, use the test command:

npm run test

You can also add Vitest to your existing project.