CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

avajs/ava

Scanned commit bbfd946322 dated 2026-05-17 — last upstream commit. Generated by codevetter 1.15.0 on 2026-10-02.

github.com/avajs/ava ↗ · 935 files · 965 KB

Please support our friend Vadim Demedes and the people in Ukraine.

Deep analysis by cli:codex via the codex CLI on 2026-10-02 (356s) — every claim below links to its cited source files. Source inspection; upstream code and tests were not executed.

Overview

AVA 8.0.1 is an ESM Node.js test runner for developers who want explicit test declarations, concurrent execution, detailed assertion diagnostics, and snapshot testing. It coordinates isolated workers per test file, runs hooks and tests inside each worker, and reports structured results through terminal or TAP output. Its distinctive extension surfaces include reusable macros, a negotiated TypeScript provider, shared-worker plugins, and dependency-aware watch mode.

System map

AVA separates CLI orchestration from per-file test execution. The parent process discovers files, prepares providers, schedules workers, and aggregates events; workers own declarations, assertions, hooks, and snapshot state. Persistent artifacts are filesystem snapshots and local scheduling caches. Distribution is an npm package with a manually dispatched release workflow.

Feature catalog

AVA's user surface combines CLI selection and execution controls with an explicit test API. Tests support modifiers, hooks, macros, asynchronous completion, execution context, and assertions. Snapshot updates, watch interactions, debugging, TAP output, and TypeScript integration extend the development workflow. Shared-worker plugins provide coordination across otherwise isolated test files.

Data flow

Configuration and CLI input become normalized project-relative selectors and transferable worker options. The parent owns file scheduling and run statistics, while each worker owns test execution and assertion state. Structured state events return through thread messaging or child-process IPC to reporters and exit-code logic. Snapshot and scheduling writes feed touched-file events back into watch mode.

Behavior traces

Source inspection followed startup, test execution, and snapshot persistence end-to-end, with additional traces for reporting, failures, scheduling, and watch reruns. These are execution-order descriptions from code rather than observed runs. Material conditions include selection, hook failures, CI snapshot policy, and worker shutdown handshakes.

Testing signals

Tests and CI were inspected, not executed; no passing results or measured coverage are asserted. AVA uses @ava/test for runtime integration tests, TAP for internal suites, and TypeScript compilation for declaration cases. Inspected coverage includes configuration, worker selection, snapshots, scheduling, watch interactions, and shared-worker lifecycle. The inventory is bounded, and CI contains explicit platform and concurrency accommodations.

Risk map

The main security-sensitive boundaries are executable configuration, arbitrary test/setup imports, inherited worker environments, inspector access, IPC, and filesystem writes. These are source observations about a developer tool that executes project code, not confirmed vulnerabilities. Additional correctness concerns involve snapshot durability, dependency tracing limits, and an error-handling branch identified by inspection. No runtime reproduction or exhaustive security audit was performed.

Extension points

AVA exposes several deliberate extension seams rather than one general plugin registry. User macros and setup modules customize test behavior, while providers customize loading and compilation. Shared-worker factories supply cross-file services through a versioned messaging protocol. CLI flags, declaration chains, reporters, and public types form coordinated internal extension surfaces.

Contributor handoff

Start with the manifest, local test/configuration files, and the source modules governing the behavior being changed. Preserve worker protocol, test ordering, snapshot compatibility, and public declaration semantics across edits. Tests and CI were inspected, not executed, so this brief provides no passing baseline. Under this task's read-only authority, commands below are future validation guidance rather than authorization to run them.

Languages

LanguageFilesShare of source
JavaScript48993%
JSON165docs/config
Markdown109docs/config
TypeScript377%
YAML3docs/config
Shell20%

Start reading here

Probable source entrypoint: lib/ — inferred from the directory tree and manifest, not the upstream docs.

Source roots

lib/ (51 files)

Repository structure

Top-level pathFiles
test/460
test-tap/301
lib/51
examples/33
docs/28
test-types/14
media/11
.github/7

Docs found: docs/01-writing-tests.mddocs/02-execution-context.mddocs/03-assertions.mddocs/04-snapshot-testing.mddocs/05-command-line.mddocs/06-configuration.mddocs/07-test-timeouts.mddocs/08-common-pitfalls.mddocs/recipes/babel.mddocs/recipes/browser-testing.md

Package

package.json — ava v8.0.1, 55 declared dependencies.

@ava/test@ava/typescript@sindresorhus/tsconfig@types/node@vercel/nftacornacorn-walkansi-escapesansi-stylesarrgvarrifyc8

CI & config entrypoints

Structural health signals

Average score 8.6/10 across 96 analyzed source files; 1 hotspot surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history