ava
8.4.0 · 7 Nov 2026MIT575.3k / weekRepositoryHomepagenpmAtom feed
8.4.0 is the newest release of 8.x.
In short
1 breaking3 changed
- Breaking
The object form of the
extensionsconfiguration is no longer supported.
Release note
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:
-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.
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:
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
Watch mode now ignores changes to
*.tsbuildinfofilesTAP reporter is more defensive when restoring the original error name, thanks to @ninper00
Reported errors when
throwsAsync/notThrowsAsyncare not awaited have been improved
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.