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

Commit 1f81308

Browse files
author
blond
committed
test(isBemEntityName): add isBemEntityName method
1 parent ae66cf1 commit 1f81308

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const test = require('ava');
2+
3+
const BemEntityName = require('../index');
4+
5+
test('should check valid entities', t => {
6+
const entityName = new BemEntityName({ block: 'block' });
7+
8+
t.true(BemEntityName.isBemEntityName(entityName));
9+
});
10+
11+
test('should not pass invalid blocks', t => {
12+
t.falsy(BemEntityName.isBemEntityName(new Array()));
13+
});
14+
15+
test('should not pass null', t => {
16+
t.falsy(BemEntityName.isBemEntityName(null));
17+
});

0 commit comments

Comments
 (0)