Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 491 Bytes

no-invalid-end.md

File metadata and controls

33 lines (22 loc) · 491 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

import test from 'ava';

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

Pass

import test from 'ava';

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

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