downloads
Across all versions.
Download trend unavailable.
compatibility
Runtime metadata.
keywords
Tagged topics.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Please support our friend Vadim Demedes and the people in Ukraine.

AVA is a test runner for Node.js with a concise API, detailed error output, embrace of new language features and thread isolation that lets you develop with confidence 🚀
Watch this repository and follow the Discussions for updates.
Read our contributing guide if you're looking to contribute (issues / PRs / etc).

Estimated unpacked size across 65 packages.
6.5 MB+
Includes dependencies.
novemberborn
mark@novemberborn.net
To install and set up AVA, run:
npm init avaYour package.json will then look like this (exact version notwithstanding):
{
"name": "awesome-package",
"type": "module",
"scripts": {
"test": "ava"
},
"devDependencies": {
"ava": "^5.0.0"
}
}Or if you prefer using Yarn:
yarn add ava --devAlternatively you can install ava manually:
npm install --save-dev avaMake sure to install AVA locally. AVA cannot be run globally.
Don't forget to configure the test script in your package.json as per above.
Create a file named test.js in the project root directory.
Note that AVA's documentation assumes you're using ES modules.
import test from 'ava';
test('foo', t => {
t.pass();
});
test('bar', async t => {
const bar = Promise.resolve('bar');
t.is(await bar, 'bar');
});npm testOr with npx:
npx avaRun with the --watch flag to enable AVA's watch mode:
npx ava --watchAVA supports the latest release of any major version that is supported by Node.js itself. Read more in our support statement.
AVA adds code excerpts and clean diffs for actual and expected values. If values in the assertion are objects or arrays, only a diff is displayed, to remove the noise and focus on the problem. The diff is syntax-highlighted too! If you are comparing strings, both single and multi line, AVA displays a different kind of output, highlighting the added or missing characters.

AVA automatically removes unrelated lines in stack traces, allowing you to find the source of an error much faster, as seen above.
AVA automatically detects whether your CI environment supports parallel builds. Each build will run a subset of all test files, while still making sure all tests get executed. See the ci-parallel-vars package for a list of supported CI environments.
Please see the files in the docs directory:
We have a growing list of common pitfalls you may experience while using AVA. If you encounter any issues you think are common, comment in this issue.
t.plan()AVA, not Ava or ava. Pronounced /ˈeɪvə/: Ay (face, made) V (vie, have) A (comma, ago)
It's the Andromeda galaxy.
5.1.0
^18.2.0
18.2.0
^3.0.0
3.0.0
^2.0.1
2.0.1
^16.2.4
16.2.4
^4.4.0
4.5.0
^6.1.0
6.1.0
^7.0.0
7.0.0
^11.0.0
11.0.0
^2.2.0
2.2.0
^3.0.1
3.0.1
^3.0.0
3.0.0
^4.2.0
4.2.0
^4.0.7
4.0.7
^10.0.0
10.0.0
^8.3.5
8.3.5
^4.0.0
4.0.0
^1.11.0
1.11.2
^7.0.0
7.0.0
^5.0.4
5.0.4
^3.0.0
3.0.0
^2.0.6
2.0.6
^6.1.1
6.2.0
^4.0.0
4.0.0
^5.0.0
6.0.0
^5.0.0
5.0.0
^5.1.0
5.1.0
^1.0.1
1.0.1
^2.1.0
2.1.0
^7.0.1
8.0.0
^3.0.0
3.0.0
^0.4.1
0.4.1