Repolode
avajs

avajs/ava

AVA is a concurrent test runner for Node.js with a concise API, detailed error output and per-file thread isolation.

Open-source alternative to:Jest

Stars
20,825
Forks
1,466
Open issues
75
Last commit
2 days ago

What is it?

AVA is a test runner for Node.js that aims to keep test code short while giving readable failure output. Tests are written with a small API using `test()` and assertions on the `t` execution context, and both Promises and async functions are supported as test bodies.

Each test file runs in its own isolated environment and tests run concurrently by default, which encourages writing atomic tests with no implicit globals. Failed assertions show code excerpts and clean diffs for objects, arrays and strings, and stack traces are trimmed to remove unrelated lines. In CI, AVA detects supported environments and splits test files across parallel builds.

AVA ships with TypeScript definitions, a TAP reporter, watch mode and snapshot testing. It is installed locally into a project and run through the `test` script or `npx ava`.

Key features

  • 01Concurrent test execution with isolated environments per test file
  • 02Magic assert with code excerpts and syntax-highlighted diffs
  • 03Clean stack traces that hide unrelated lines
  • 04Automatic test splitting across parallel CI builds
  • 05Built-in TypeScript definitions, TAP reporter and watch mode

Use cases

  • Unit testing a Node.js library or backend service
  • Running a large test suite quickly in parallel CI builds
  • Testing TypeScript projects with bundled type definitions

Quick start

  1. 1

    Install and set up AVA in your project

    npm init ava
  2. 2

    Create a test.js file in the project root with your tests

  3. 3

    Run your tests

    npm test

Things to know

  • AVA cannot be run globally and must be installed locally in each project.
  • Documentation assumes you are using ES modules.

In collections

Topics

FAQ

What is ava?
AVA is a concurrent test runner for Node.js with a concise API, detailed error output and per-file thread isolation. AVA is a test runner for Node.js that aims to keep test code short while giving readable failure output. Tests are written with a small API using `test()` and assertions on the `t` execution context, and both Promises and async functions are supported as test bodies.
Is ava free to use? What license does it have?
ava is open source under the MIT license. Check the license terms before using it in commercial products.
Is ava still maintained?
Actively maintained. The last commit to ava was on Oct 23, 2026.
What can I use ava for?
Unit testing a Node.js library or backend service Running a large test suite quickly in parallel CI builds Testing TypeScript projects with bundled type definitions
How do I install ava?
Install and set up AVA in your project: npm init ava Create a test.js file in the project root with your tests Run your tests: npm test
Where can I get ava?
The source code and installation instructions are on GitHub: https://github.com/avajs/ava

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects