Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 502 Bytes

no-invalid-end.md

File metadata and controls

33 lines (22 loc) · 502 Bytes

Ensure t.end() is only called inside test.cb()

Translations: Français

AVA will fail if t.end() is called in a non-.cb test function.

Fail

const test = require('ava');

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

Pass

const test = require('ava');

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

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