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();
});