vitest Command Examples

Fast, modern testing framework built for Vite, offering seamless integration, TypeScript support, and a Jest-compatible API for unit, integration, and snapshot testing. More information: https://vitest.dev/guide.

vitest run

vitest run {{path/to/file1 path/to/file2 ...}}

vitest run {{regular_expression1}} {{regular_expression2}}

vitest run --testNamePattern {{regular_expression}}

vitest

vitest run --coverage

vitest run --bail=1

vitest --help