Skip to content

Commit

Permalink
tests: add 2 edge cases for single val
Browse files Browse the repository at this point in the history
  • Loading branch information
qfox committed Jul 30, 2016
1 parent 8b721f1 commit 94a68db
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/assign.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,20 @@ test('should use modVal from scope if nothing given', t => {
{ entity: { block: 'sb', modName: 'sm', modVal: 'sv' }, tech: null });
});

test('should not use modVal from scope if only block given', t => {
t.deepEqual(assign(
{ entity: { modVal: 'sv' } },
{ entity: { block: 'sb' } }),
{ entity: { block: 'sb' }, tech: null });
});

test('should not use modVal from scope if only elem given', t => {
t.deepEqual(assign(
{ entity: { modVal: 'sv' } },
{ entity: { block: 'sb', elem: 'se' } }),
{ entity: { block: 'sb', elem: 'se' }, tech: null });
});

// Tech related specs

test('assign should support tech grabbing from scope', t => {
Expand Down

0 comments on commit 94a68db

Please sign in to comment.