# Extension points — avajs/ava

> Canonical page: https://codevetter.com/unpack/ava/extension-points

# Extension points — avajs/ava

Scanned commit bbfd946322fdeca2b547a691d947fb4e18c0c67f (2026-05-17). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

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.
- CLI options are centralized in FLAGS and yargs command definitions; adding an execution option also requires mapping it into combined configuration and Api constructor options. — [lib/cli.js#L30-L93](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/cli.js#L30-L93) [lib/cli.js#L164-L215](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/cli.js#L164-L215) [lib/cli.js#L221-L237](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/cli.js#L221-L237) [lib/cli.js#L407-L432](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/cli.js#L407-L432)
- createChain() uses a WeakMap registry and metadata flags to compose declaration APIs; macros are frozen exec/title records interpreted by parseTestArgs(). — [lib/create-chain.js#L1-L39](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/create-chain.js#L1-L39) [lib/create-chain.js#L121-L168](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/create-chain.js#L121-L168) [lib/parse-test-args.js#L17-L25](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/parse-test-args.js#L17-L25)
- Configuration may export an async factory receiving projectDir; require entries can name setup modules or argument tuples whose default functions are awaited before tests. — [lib/load-config.js#L142-L147](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/load-config.js#L142-L147) [lib/api.js#L24-L31](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/api.js#L24-L31) [lib/worker/base.js#L207-L213](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/worker/base.js#L207-L213)
- provider-manager imports a provider factory and negotiates ava-8; the negotiated interface supplies AVA version, projectDir, findFiles(), and glob normalization, with @ava/typescript as the registered provider. — [lib/provider-manager.js#L7-L54](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/provider-manager.js#L7-L54)
- Provider main hooks contribute extensions, update globs, and compile state; worker hooks expose canLoad()/load(), while watcher hooks interpret compilation changes. — [lib/extensions.js#L24-L26](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/extensions.js#L24-L26) [lib/globs.js#L71-L73](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/globs.js#L71-L73) [lib/api.js#L240-L246](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/api.js#L240-L246) [lib/worker/base.js#L157-L179](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/worker/base.js#L157-L179)
- ava/plugin.registerSharedWorker() deduplicates registrations by filename and requires ava-4; its factory interface exposes readiness, broadcasts, subscriptions, connected test workers, and per-worker teardown. — [entrypoints/plugin.js#L1-L1](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/entrypoints/plugin.js#L1-L1) [lib/worker/plugin.js#L86-L127](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/worker/plugin.js#L86-L127) [lib/plugin-support/shared-worker-loader.js#L175-L237](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/plugin-support/shared-worker-loader.js#L175-L237)
- Reporter classes consume plan.status stateChange events through startRun()/endRun(); experimental observeRun exposes an async event iterator only when observeRunsFromConfig is enabled. — [lib/reporters/default.js#L134-L153](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/reporters/default.js#L134-L153) [lib/reporters/tap.js#L67-L85](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/reporters/tap.js#L67-L85) [lib/cli.js#L465-L468](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/cli.js#L465-L468) [lib/load-config.js#L11-L11](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/load-config.js#L11-L11)
- registerCompletionHandler() adds ordered callbacks scheduled on nextTick without awaiting results; exported declaration files provide the corresponding typed public API surface. — [entrypoints/main.js#L1-L2](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/entrypoints/main.js#L1-L2) [lib/worker/completion-handlers.js#L5-L12](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/worker/completion-handlers.js#L5-L12) [entrypoints/main.d.ts#L1-L20](https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/entrypoints/main.d.ts#L1-L20)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
