AVA runs JavaScript and TypeScript tests in parallel with isolated files, rich assertion diffs, and built-in support for promises, async functions, and observables.
Overview
AVA is a test harness for Node.js aimed at fast feedback during everyday development. Tests use a small assert-centric API, run concurrently by default, and each file executes in its own isolated environment without leaking globals across suites.
Assertion failures emphasize readability: object and array mismatches show syntax-highlighted diffs, and string comparisons highlight added or trimmed characters. Stack traces are trimmed to drop unrelated frames so failures point closer to the test code. A TAP reporter is available for tooling that speaks that format.
The runner accepts modern ECMAScript features out of the box and ships TypeScript typings. Watch mode re-executes affected tests on save, and CI integrations can shard test files across parallel build workers when the environment advertises support.
Projects install AVA as a local dev dependency and invoke it through npm scripts or npx. Documentation covers snapshots, timeouts, shared workers, coverage recipes, and browser or endpoint testing patterns.
Key features
- Concurrent per-file test execution
- Isolated scope per test file
- Rich diff-style assertion output
- Promise and async test support
- Observable test support
- TypeScript definition included
- Watch mode for local runs
- CI parallel test file sharding
Use cases
- Unit tests in Node.js packages
- TypeScript project test suites
- Fast local TDD feedback loops
- Parallel CI test splitting
- Snapshot-based regression checks