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

Commit a1bc9bd

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

15 files changed

+26
-26
lines changed

test/belongs-to.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('../lib/entity-name');
3+
import BemEntityName from '..';
44

55
test('should not detect belonging between block and itself', t => {
66
const blockName = new BemEntityName({ block: 'block' });

test/bem-fields.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
22

3-
import BemEntityName from '../lib/entity-name';
3+
import BemEntityName from '..';
44

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

test/create.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
22

3-
import BemEntityName from '../lib/entity-name';
3+
import BemEntityName from '..';
44

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

test/deprecate.test.js

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

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

77
const deprecateSpy = sinon.spy();
88
const deprecate = proxyquire('../lib/deprecate', {

test/entity-type-error.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 EntityTypeError = require('../lib/entity-type-error');
3+
import EntityTypeError from '../lib/entity-type-error';
44

55
test('should create type error', t => {
66
const error = new EntityTypeError();

test/id.test.js

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

5-
import BemEntityName from '../lib/entity-name';
5+
import BemEntityName from '..';
66

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

test/inspect.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import test from 'ava';
2-
const sinon = require('sinon');
1+
import {EOL} from 'os';
32

4-
import BemEntityName from '../lib/entity-name';
3+
import test from 'ava';
4+
import sinon from 'sinon';
55

6-
const EOL = require('os').EOL;
6+
import BemEntityName from '..';
77

88
test.beforeEach(t => {
99
t.context.stdoutWriteStub = sinon.stub(process.stdout, 'write');

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
22

3-
import BemEntityName from '../lib/entity-name';
3+
import BemEntityName from '..';
44

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

test/is-equal.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
22

3-
import BemEntityName from '../lib/entity-name';
3+
import BemEntityName from '..';
44

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

test/is-simple-mod.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
22

3-
import BemEntityName from '../lib/entity-name';
3+
import BemEntityName from '..';
44

55
test('should be true for simple modifiers', t => {
66
const entityName = new BemEntityName({ block: 'block', mod: 'mod' });

0 commit comments

Comments
 (0)