Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 720 Bytes

use-t.md

File metadata and controls

33 lines (22 loc) · 720 Bytes

Ensure test functions use t as their parameter (ava/use-t)

💼 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.

Fail

const test = require('ava');

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

Pass

const test = require('ava');

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

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