Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 541 Bytes

File metadata and controls

35 lines (22 loc) · 541 Bytes

Ensure tests have a title

Tests should have a title.

Fail

import test from 'ava';

test(t => {
	t.pass();
});

Pass

import test from 'ava';

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

Options

The rule takes one option, a string, which could be either "always" or "if-multiple". The default is "always". If the option is set to "if-multiple", the rule will only trigger if there are multiple tests in a file.

You can set the option in configuration like this:

"ava/test-title": [2, "always"]