Skip to content
This repository was archived by the owner on Feb 4, 2018. It is now read-only.

Commit ffa8eea

Browse files
author
blond
committed
test(typing): use imports for typing
It is necessary for types, that provides module with `export default`.
1 parent 7293daf commit ffa8eea

15 files changed

+31
-27
lines changed

test/.eslintrc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parserOptions:
2+
ecmaVersion: 6
3+
sourceType: 'module'
4+

test/construct.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const test = require('ava');
1+
import test from 'ava';
22

3-
const BemEntityName = require('../index');
3+
import BemEntityName from '../index';
44

55
test('should create object for block', t => {
66
const data = { block: 'b' };

test/create.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const test = require('ava');
1+
import test from 'ava';
22

3-
const BemEntityName = require('../index');
3+
import BemEntityName from '../index';
44

55
test('should return object as is if it`s a BemEntityName', t => {
66
const entity = new BemEntityName({ block: 'b' });

test/fields.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const test = require('ava');
1+
import test from 'ava';
22

3-
const BemEntityName = require('../index');
3+
import BemEntityName from '../index';
44

55
test('should provide `block` field', t => {
66
const entity = new BemEntityName({ block: 'block' });

test/id.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const test = require('ava');
1+
import test from 'ava';
22
const sinon = require('sinon');
33
const proxyquire = require('proxyquire');
44

5-
const BemEntityName = require('../index');
5+
import BemEntityName from '../index';
66

77
test('should build equal id for equal blocks', t => {
88
const entity1 = new BemEntityName({ block: 'block' });

test/inspect.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const test = require('ava');
1+
import test from 'ava';
22
const sinon = require('sinon');
33

4-
const BemEntityName = require('../index');
4+
import BemEntityName from '../index';
55

66
const EOL = require('os').EOL;
77

test/is-bem-entity-name.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const test = require('ava');
1+
import test from 'ava';
22

3-
const BemEntityName = require('../index');
3+
import BemEntityName from '../index';
44

55
test('should check valid entities', t => {
66
const entityName = new BemEntityName({ block: 'block' });

test/is-equal.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const test = require('ava');
1+
import test from 'ava';
22

3-
const BemEntityName = require('../index');
3+
import BemEntityName from '../index';
44

55
test('should detect equal block', t => {
66
const entity1 = new BemEntityName({ block: 'block' });

test/is-simple.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const test = require('ava');
1+
import test from 'ava';
22

3-
const BemEntityName = require('../index');
3+
import BemEntityName from '../index';
44

55
test('should be true for simple modifiers', t => {
66
const entity = BemEntityName.create({ block: 'button2', mod: { name: 'theme' } });

test/modules.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const test = require('ava');
1+
import test from 'ava';
22

3-
const BemEntityName = require('../index');
3+
import BemEntityName from '../index';
44

55
test('should export to default', t => {
66
t.is(BemEntityName, BemEntityName.default);

0 commit comments

Comments
 (0)