ava/test-title

February 10, 2026 Β· View on GitHub

πŸ“ Require tests to have a title.

πŸ’Ό This rule is enabled in the βœ… recommended config.

πŸ”§ This rule is automatically fixable by the --fix CLI option.

Translations: FranΓ§ais

Tests should have a title. AVA v1.0.1 and later enforces this at runtime.

The title must be a non-empty string without leading or trailing whitespace.

Examples

import test from 'ava';

test(t => { // ❌ Missing title
	t.pass();
});

test(123, t => { // ❌ Non-string title
	t.pass();
});

test('', t => { // ❌ Empty title
	t.pass();
});

test(' foo ', t => { // ❌ Leading/trailing whitespace (auto-fixable)
	t.pass();
});

test('foo', t => { // βœ…
	t.pass();
});