Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 492 Bytes

no-cb-test.md

File metadata and controls

28 lines (18 loc) · 492 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

const test = require('ava');

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

Pass

const test = require('ava');

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