Skip to content

Latest commit

 

History

History
62 lines (38 loc) · 1.36 KB

readme.md

File metadata and controls

62 lines (38 loc) · 1.36 KB

ava-thanable

await AVA tests

Build Status Coverage Status

Example

import test from 'ava-thenable';

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

test.join(login, 'post something', t => {
	t.pass();
});

Install

yarn add --dev ava-thenable

API

This module only extends the AVA API, all the methods not mentioned here should work the same way they work with vanilla AVA.

test(...args)

Returns a Promise that resolves when the test has finished.

test.join(...testPromises, ...args)

Defines a test that waits the promises of other tests (testPromises). Named after Bluebird.join.

test.configureThenable(options)

Make a call to test.configureThenable before defining any tests.

Example:

import test from 'ava-thenable';

test.configureThenable({
	concurrency: 3,
});

// ...

concurrency

Type: number Default: Infinity

Concurrency limit.

This option is passed to p-queue