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

Commit

Permalink
add comments, xit -> it.skip
Browse files Browse the repository at this point in the history
  • Loading branch information
dfilatov committed Sep 25, 2013
1 parent 67461b2 commit 407d1db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
3 changes: 2 additions & 1 deletion lib/techs/v2/deps.js.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ var Deps = exports.Deps = INHERIT({
items[itemKey] = item;
item.include && this.itemsByOrder.push(itemKey);
} else if(!itemByKey.include && item.include) {
// update `include` for existing item in case of adding of new item without `include: false`
itemByKey.include = true;
this.itemsByOrder.push(itemKey);
}
Expand Down Expand Up @@ -418,7 +419,7 @@ var Deps = exports.Deps = INHERIT({
var key = i.buildKey(),
ctxTech = ctx && ctx.item.tech || '';
if(!uniq.hasOwnProperty(key) || !uniq[key].hasOwnProperty(ctxTech)) {
if(i.include) {
if(i.include) { // include only items without `include: false`
(uniq[key] || (uniq[key] = {}))[ctxTech] = true;
var newCtx = ctx || i;
_this.forEach(fn, uniq, i.mustDeps, newCtx);
Expand Down
31 changes: 15 additions & 16 deletions test/v2-deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var assert = require('chai').assert,
*
* @name describe @function
* @name it @function
* @name xit @function
* @name before @function
* @name after @function
* @name beforeEach @function
Expand Down Expand Up @@ -111,13 +110,13 @@ describe('Deps', function() {
));

// TODO: https://github.com/bem/bem-tools/issues/401
//xit('block with elem array', assertDepsParse(
//[ { block: 'b1', elem: ['e1', 'e2'] } ],
//{ '': {'': [
//{block: 'b1', elem: 'e1'},
//{block: 'b1', elem: 'e2'}
//] } }
//));
it.skip('block with elem array', assertDepsParse(
[ { block: 'b1', elem: ['e1', 'e2'] } ],
{ '': {'': [
{block: 'b1', elem: 'e1'},
{block: 'b1', elem: 'e2'}
] } }
));

});

Expand Down Expand Up @@ -153,14 +152,14 @@ describe('Deps', function() {
));

// TODO: https://github.com/bem/bem-tools/issues/413
//xit('block with tech shortcut', assertDepsParse(
//{block: 'b1', tech: 't1', shouldDeps: {tech: 't2'}},
//{ 't1': {
//'t1': [ { block: 'b1', tech: 't1'} ],
//'t2': [ { block: 'b1', tech: 't2'} ]
//}
//}
//));
it.skip('block with tech shortcut', assertDepsParse(
{block: 'b1', tech: 't1', shouldDeps: {tech: 't2'}},
{ 't1': {
't1': [ { block: 'b1', tech: 't1'} ],
't2': [ { block: 'b1', tech: 't2'} ]
}
}
));

it('block with and without tech', assertDepsParse(
{ block: 'b1', shouldDeps: { block: 'b2', tech: 't2', shouldDeps: { block: 'b3' } } },
Expand Down

0 comments on commit 407d1db

Please sign in to comment.