Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 689 Bytes

File metadata and controls

31 lines (21 loc) · 689 Bytes

ava/use-t

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