Download Latest Version v8.0.1 source code.zip (3.6 MB)
Email in envelope

Get an email when there's a new version of AVA

Home / v8.0.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-04-27 2.4 kB
v8.0.0 source code.tar.gz 2026-04-27 3.2 MB
v8.0.0 source code.zip 2026-04-27 3.5 MB
Totals: 3 Items   6.8 MB 0

Breaking Changes

AVA now expects Node.js 22.20, 24.12 or newer.

Internally AVA is now fully ESM. This is possible now that Node.js supports loading ES modules using require() calls and simplifies AVA's types and internals.

If you use AVA from a CommonJS project you'll have to update your imports:

:::diff
-const test = require('ava');
+const {default: test} = require('ava');

We expect an increasing number of projects to be ESM only. As per the above, CommonJS is still supported, but we don't expect cjs extensions to be used. The default file extensions are now js and mjs. Specify extensions: ['cjs', 'js', 'mjs'] for AVA to run test files with the cjs extension.

All test files (and those loaded through AVA's require config) are now loaded via import(). Use customization hooks for transpilation. The object form of the extensions configuration is no longer supported.

If you use AVA with @ava/typescript you must upgrade that package to v7.

New Features

There's two new test modifiers courtesy of @sindresorhus: test.skipIf() to skip a test based on a runtime condition. test.runIf() is the inverse: the test only runs when the condition is true.

:::js
test.skipIf(process.platform === 'win32')('not on Windows', t => {
    t.pass();
});

test.runIf(process.platform === 'linux')('Linux only', t => {
    t.pass();
});

These work with other modifiers like .serial and .failing:

:::js
test.serial.skipIf(process.platform === 'win32')('serial, not on Windows', t => {
    t.pass();
});

test.failing.skipIf(process.platform === 'win32')('expected failure, not on Windows', t => {
    t.fail();
});

Other Changes

New Contributors

Full Changelog: https://github.com/avajs/ava/compare/v7.0.0...v8.0.0

Source: README.md, updated 2026-04-27