All Projects → avajs → Ava

avajs / Ava

Licence: mit
Node.js test runner that lets you develop with confidence 🚀

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Ava

Promise Fun
Promise packages, patterns, chat, and tutorials
Stars: ✭ 3,779 (-80.58%)
Mutual labels:  async, concurrency, unicorns, async-functions
Zunit
A powerful testing framework for ZSH projects
Stars: ✭ 140 (-99.28%)
Mutual labels:  unit-testing, test-framework, test-runner, tap
tropic
🍍 Test Runner Library
Stars: ✭ 29 (-99.85%)
Mutual labels:  tap, unit-testing, test-runner, test-framework
Dredd
Language-agnostic HTTP API Testing Tool
Stars: ✭ 3,770 (-80.62%)
Mutual labels:  cli-app, unit-testing, test-framework, test-runner
Baretest
An extremely fast and simple JavaScript test runner.
Stars: ✭ 364 (-98.13%)
Mutual labels:  tdd, test-framework, test-runner, tap
oletus
Minimal ECMAScript Module test runner
Stars: ✭ 43 (-99.78%)
Mutual labels:  unit-testing, tdd, test-runner, test-framework
Fkill Cli
Fabulously kill processes. Cross-platform.
Stars: ✭ 6,418 (-67.02%)
Mutual labels:  cli-app, cli, unicorns
Archisteamfarm
C# application with primary purpose of idling Steam cards from multiple accounts simultaneously.
Stars: ✭ 7,219 (-62.9%)
Mutual labels:  cli-app, cli, hacktoberfest
Forge Node App
🛠📦🎉 Generate Node.js boilerplate with optional libraries & tools
Stars: ✭ 90 (-99.54%)
Mutual labels:  cli-app, cli, babel
eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (-99.79%)
Mutual labels:  unit-testing, test-runner, test-framework
Alsatian
TypeScript testing framework with test cases
Stars: ✭ 244 (-98.75%)
Mutual labels:  hacktoberfest, unit-testing, tdd
Tldr
Golang command line client for tldr https://github.com/tldr-pages/tldr
Stars: ✭ 210 (-98.92%)
Mutual labels:  cli-app, cli, hacktoberfest
quasar-testing
Testing Harness App Extensions for the Quasar Framework 1.0+
Stars: ✭ 142 (-99.27%)
Mutual labels:  unit-testing, test-runner, ava
Rust Sloth
A 3D software rasterizer... for the terminal!
Stars: ✭ 478 (-97.54%)
Mutual labels:  cli-app, cli, hacktoberfest
Acutest
Simple header-only C/C++ unit testing facility.
Stars: ✭ 170 (-99.13%)
Mutual labels:  cli, unit-testing, test-runner
Executor
Watch for file changes and then execute command. Very nice for test driven development.
Stars: ✭ 14 (-99.93%)
Mutual labels:  cli, hacktoberfest, tdd
chai-exclude
Exclude keys to compare from a deep equal operation with chai expect or assert.
Stars: ✭ 33 (-99.83%)
Mutual labels:  unit-testing, tdd, assert
Promise Pool
Map-like, concurrent promise processing
Stars: ✭ 258 (-98.67%)
Mutual labels:  hacktoberfest, async, concurrency
Nunit
NUnit 3 Framework
Stars: ✭ 2,131 (-89.05%)
Mutual labels:  hacktoberfest, tdd, test-framework
Fluentassertions
A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.7, .NET Core 2.1 and 3.0, as well as .NET Standard 2.0 and 2.1. Supports the unit test frameworks MSTest2, NUnit3, XUnit2, MSpec, and NSpec3.
Stars: ✭ 2,449 (-87.41%)
Mutual labels:  hacktoberfest, unit-testing, tdd

AVA logo

AVA is a test runner for Node.js with a concise API, detailed error output, embrace of new language features and process isolation that lets you develop with confidence 🚀

Follow the AVA Twitter account for updates.

Read our contributing guide if you're looking to contribute (issues / PRs / etc).

Translations: Español, Français, Italiano, 日本語, 한국어, Português, Русский, 简体中文

Why AVA?

Usage

To install and set up AVA, run:

npm init ava

Your package.json will then look like this (exact version notwithstanding):

{
	"name": "awesome-package",
	"scripts": {
		"test": "ava"
	},
	"devDependencies": {
		"ava": "^1.0.0"
	}
}

Or if you prefer using Yarn:

yarn add ava --dev

Alternatively you can install ava manually:

npm install --save-dev ava

Don't forget to configure the test script in your package.json as per above.

Create your test file

Create a file named test.js in the project root directory:

const test = require('ava');

test('foo', t => {
	t.pass();
});

test('bar', async t => {
	const bar = Promise.resolve('bar');
	t.is(await bar, 'bar');
});

Running your tests

npm test

Or with npx:

npx ava

Run with the --watch flag to enable AVA's watch mode:

npx ava --watch

Supported Node.js versions

AVA supports the latest release of any major version that is supported by Node.js itself. Read more in our support statement.

Highlights

Magic assert

AVA adds code excerpts and clean diffs for actual and expected values. If values in the assertion are objects or arrays, only a diff is displayed, to remove the noise and focus on the problem. The diff is syntax-highlighted too! If you are comparing strings, both single and multi line, AVA displays a different kind of output, highlighting the added or missing characters.

Clean stack traces

AVA automatically removes unrelated lines in stack traces, allowing you to find the source of an error much faster, as seen above.

Parallel runs in CI

AVA automatically detects whether your CI environment supports parallel builds. Each build will run a subset of all test files, while still making sure all tests get executed. See the ci-parallel-vars package for a list of supported CI environments.

Documentation

Please see the files in the docs directory:

Common pitfalls

We have a growing list of common pitfalls you may experience while using AVA. If you encounter any issues you think are common, comment in this issue.

Recipes

FAQ

Why not mocha, tape, tap?

Mocha requires you to use implicit globals like describe and it with the default interface (which most people use). It's not very opinionated and executes tests serially without process isolation, making it slow.

Tape and tap are pretty good. AVA is highly inspired by their syntax. They too execute tests serially. Their default TAP output isn't very user-friendly though so you always end up using an external tap reporter.

In contrast AVA is highly opinionated and runs tests concurrently, with a separate process for each test file. Its default reporter is easy on the eyes and yet AVA still supports TAP output through a CLI flag.

How is the name written and pronounced?

AVA, not Ava or ava. Pronounced /ˈeɪvə/: Ay (face, made) V (vie, have) A (comma, ago)

What is the header background?

It's the Andromeda galaxy.

What is the difference between concurrency and parallelism?

Concurrency is not parallelism. It enables parallelism.

Support

Related

Links

Team

Mark Wubben Sindre Sorhus
Mark Wubben Sindre Sorhus
Former
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].