Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 482 Bytes

no-cb-test.md

File metadata and controls

28 lines (18 loc) · 482 Bytes

Ensure no test.cb() is used

Translations: Français

Disallow the use of test.cb(). We instead recommend using test() with an async function or a function returning a promise.

Fail

import test from 'ava';

test.cb('some test', t => {
	t.pass();
	t.end();
});

Pass

import test from 'ava';

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