Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 635 Bytes

use-test.md

File metadata and controls

26 lines (19 loc) · 635 Bytes

Ensure that AVA is imported with test as the variable name

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.

Fail

var ava = require('ava');
let ava = require('ava');
const ava = require('ava');
import ava from 'ava';

Pass

var test = require('ava');
let test = require('ava');
const test = require('ava');
import test from 'ava';

var test = require('foo');
import test from 'foo';