ava/use-t
February 8, 2026 · View on GitHub
📝 Require test functions to use t as their parameter.
💼 This rule is enabled in the ✅ recommended config.
Translations: Français
The convention is to have the parameter in AVA's test function be named t. Most rules in eslint-plugin-ava are based on that assumption.
Examples
import test from 'ava';
// ❌
test('foo', foo => { // Incorrect name
t.pass();
});
// ✅
test('foo', () => {
// ...
});
test('bar', t => {
t.pass();
});