ava
8.4.0 · 7 Nov 2026MIT575.3k / weekRepositoryHomepagenpmAtom feed
8.4.0 is the newest release of 8.x.
In short
3 faster
Release note
Code block formatting for string snapshots
This release adds an overload for t.snapshot():
t.snapshot(expected, {formatAsCodeBlock}, message?)
The overload is only accepted when expected is a string. The string is stored verbatim and rendered as a fenced code block in the resulting .snap.md file. Set formatAsCodeBlock to true for a generic code block, or a non-empty language identifier string for syntax highlighting:
test('generates code', t => {
const code = generate();
t.snapshot(code, {formatAsCodeBlock: 'js'});
});The resulting snapshots can only be read with AVA 8.1 or newer, but snapshots that do not contain code blocks are backwards compatible. And existing snapshots can still be read, of course.
Performance improvements
~40% faster for many small test files (startup-bound)
~30% faster for a single file with thousands of tests
~50% faster for many files run concurrently
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.