💼 This rule is enabled in the ✅ recommended
config.
Translations: Français
The convention is to import AVA and assign it to a variable named test
. Most rules in eslint-plugin-ava
are based on that assumption.
In a TypeScript file (.ts
or .tsx
) AVA can be assigned to a variable named anyTest
in order to define the types of t.context
(see Typing t.context). Type-only imports (import type ... from 'ava'
) are not linted.
var ava = require('ava');
let ava = require('ava');
const ava = require('ava');
import ava from 'ava';
var test = require('ava');
let test = require('ava');
const test = require('ava');
import test from 'ava';
var test = require('foo');
const test = require('foo');
import anyTest from 'ava';
import type {TestInterface} from 'ava';
const test = anyTest as TestInterface<{foo: string}>;