You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migrate from AVA to Node.js native test runner #344
Migrate from AVA to the Node.js native test runner (node:test) with built-in snapshot support. This would replace AVA's binary snapshot format with human-readable text-based snapshots that are more Git-friendly.
Motivation
AVA stores snapshots in a binary format (tests/snapshots/index.js.snap), which is inefficient for Git — binary files produce no meaningful diffs and bloat repository history. The Node.js native test runner (available since v22.3.0, stable since v23.4.0) provides snapshot support that generates human-readable CommonJS text files, making snapshot changes easy to review in pull requests.
Why this is straightforward
Only one file (tests/index.js, ~30 lines) uses AVA directly. All 22 .test.js files are standalone Node.js scripts with no AVA imports.
Direct API mapping: test() → test(), t.snapshot() → t.assert.snapshot()
The execa subprocess spawning pattern, c8 coverage, and all test helpers remain unchanged.
Prerequisites
Node.js ≥22 (for snapshot support in node:test). This should be revisited after upgrading to Node 24, where snapshot testing is fully stable.
Implementation outline
package.json: Remove ava from devDependencies, update test script from c8 --100 ava tests/index.js to c8 --100 node --test tests/index.js
tests/index.js: Replace import test from "ava" with import { test } from "node:test", change t.snapshot(value, label) to t.assert.snapshot(value)
Deletetests/snapshots/ directory (binary AVA snapshot files)
Generate new text-based snapshots with node --test --test-update-snapshots tests/index.js
Activity
test: migrate from AVA to Node.js native test runner
test: migrate from AVA to Node.js native test runner
test: migrate from AVA to Node.js native test runner
test: migrate from AVA to Node.js native test runner (#346)
create-app-token-action-releaser commentedon Mar 13, 2026
🎉 This issue has been resolved in version 3.0.0-beta.5 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
test: migrate from AVA to Node.js native test runner (#346)
test: migrate from AVA to Node.js native test runner (#346)
create-app-token-action-releaser commentedon Mar 14, 2026
🎉 This issue has been resolved in version 3.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
test: migrate from AVA to Node.js native test runner (actions#346)