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

Commit

Permalink
tests: use simplified API
Browse files Browse the repository at this point in the history
  • Loading branch information
qfox committed Jan 26, 2017
1 parent 0864cbe commit 1c4365a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/to-string.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ test('should use `naming.stringify()` for elem', t => {
});

test('should use `naming.stringify()` for block modifier', t => {
const entity = new BemEntityName({ block: 'block', modName: 'mod', modVal: 'val' });
const entity = new BemEntityName({ block: 'block', mod: { name: 'mod', val: 'val' } });

entity.toString();

t.truthy(spy.calledWith({ block: 'block', modName: 'mod', modVal: 'val' }));
});

test('should use naming.stringify() for element modifier', t => {
const entity = new BemEntityName({ block: 'block', elem: 'elem', modName: 'mod', modVal: 'val' });
const entity = new BemEntityName({ block: 'block', elem: 'elem', mod: { name: 'mod', val: 'val' } });

entity.toString();

Expand Down
4 changes: 2 additions & 2 deletions test/type.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test('should determine block', t => {
});

test('should determine modifier of block', t => {
const entityName = new BemEntityName({ block: 'block', mod: 'mod' });
const entityName = new BemEntityName({ block: 'block', mod: { name: 'mod' } });

t.is(entityName.type, 'blockMod');
});
Expand All @@ -21,7 +21,7 @@ test('should determine elem', t => {
});

test('should determine modifier of element', t => {
const entityName = new BemEntityName({ block: 'block', elem: 'elem', mod: 'mod' });
const entityName = new BemEntityName({ block: 'block', elem: 'elem', mod: { name: 'mod' } });

t.is(entityName.type, 'elemMod');
});
Expand Down

0 comments on commit 1c4365a

Please sign in to comment.