Generated by GPT-5-mini| AVA (test runner) | |
|---|---|
| Name | AVA |
| Developer | Sindre Sorhus, contributors |
| Initial release | 2015 |
| Operating system | Linux, macOS, Microsoft Windows |
| Programming language | JavaScript (programming language), Node.js |
| License | MIT License |
AVA (test runner) AVA is a high-performance JavaScript (programming language) test runner built on Node.js that emphasizes minimal configuration, concurrent test execution, and a terse API for unit and integration tests. It targets modern ECMAScript features and integrates with Babel, TypeScript, and npm-centric workflows used in many GitHub projects and Open Source ecosystems. The project has been adopted in libraries and applications across a range of organizations and communities, and is noted for its opinionated defaults and focus on parallelism.
AVA was created to provide a fast, concise testing experience for JavaScript (programming language) and TypeScript developers working with Node.js and modern ECMAScript syntax. Influenced by design decisions from test frameworks such as Jest, Mocha (software), Tape (software), and Jasmine (JavaScript testing framework), AVA introduced process-isolated test execution to exploit multi-core Central processing unit resources and reduce inter-test interference. The runner integrates with Babel transpilation pipelines and package ecosystems like npm and Yarn (package manager), and has been discussed in community forums and conferences including JSConf, Node.js Foundation, and Frontend Masters workshops.
AVA's core features include process isolation, concurrency, a minimal API, and snapshot testing compatibility. Process isolation is implemented via separate child processes per file to prevent shared-state leaks, a model also explored by Jest and Karma (software). AVA's concurrency model schedules tests across CPU cores similar to strategies used in GNU Parallel and multi-process approaches in Go (programming language). The API is intentionally small—single global test function and promise/async support—echoing minimalistic designs like Tape (software) while supporting features found in Mocha (software) and Jasmine (JavaScript testing framework). AVA supports assertions through libraries such as Node.js assert, Chai (software), and integrates with snapshot tools pioneered by Facebook's Jest.
Installation is typically performed with package managers like npm, Yarn (package manager), or pnpm and configured in package.json scripts or configuration files. AVA can be configured with .ava.config files or package.json keys, and supports Babel presets from @babel/preset-env and TypeScript compilation via ts-node or precompiled artifacts. Continuous integration setups commonly include Travis CI, CircleCI, GitHub Actions, and Jenkins pipelines, where AVA's exit codes and JSON reporters integrate with those services. Developers often combine AVA with linters like ESLint and formatters like Prettier to enforce style and correctness across projects.
The command-line interface exposes a simple test runner command invoked from scripts in package.json or directly via npx. Common flags control concurrency, match patterns, tap output, and reporter selection, paralleling options available in Mocha (software) and Jest. AVA encourages use of async/await patterns standardized by ECMAScript 2017 and integrates with promises as in libraries like Bluebird or native Promise (computing). Output formats include TAP-compatible modes used by Test Anything Protocol tooling and JSON reporters consumed by CI services like GitLab CI and TeamCity.
An ecosystem of helper modules, reporters, and assertion libraries surrounds AVA, with community packages hosted on npm and discussions on GitHub. Integrations exist for coverage tools such as Istanbul (software)/nyc (software), performance measurement libraries, and snapshot utilities influenced by Jest snapshots. Plugin and utility development aligns with patterns in Open Source communities like Node.js Foundation and extension practices found in Webpack and Babel ecosystems. Popular community contributors and projects often coordinate via GitHub Issues and Pull request workflows, with maintainers referencing standards from Semantic Versioning.
Compared with Jest, AVA offers lighter-weight configuration and file-level parallelism but lacks some of Jest's integrated mocking and rich snapshot tooling. Relative to Mocha (software), AVA provides stricter isolation and built-in concurrency rather than plugin-driven parallelism. Against Tape (software), AVA supplies a higher-level API and test isolation model while keeping a compact surface similar to Tape (software)'s philosophy. In ecosystems where Jest, Mocha (software), Jasmine (JavaScript testing framework), Tape (software), and Karma (software) compete, AVA occupies a niche prioritizing speed, simplicity, and multi-core utilization favored by performance-conscious projects and organizations.
AVA was first announced and released by Sindre Sorhus and contributors in 2015, emerging from discussions in the Node.js and JavaScript (programming language) communities about test speed and isolation. The project evolved through community contributions on GitHub and adoption in libraries across npm packages, with development influenced by practices at organizations using Continuous integration services such as Travis CI and CircleCI. Over time, AVA incorporated features for modern ECMAScript support, integrations with Babel and TypeScript, and refinements to concurrency and reporter interfaces informed by usage patterns in large open-source repositories.
Category:JavaScript testing frameworks