Skip to content

Commit

Permalink
correct transform bemjson to deps
Browse files Browse the repository at this point in the history
  • Loading branch information
dfilatov committed Jul 30, 2013
1 parent a35415d commit b2bf835
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bem/techs/test.js.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var QFS = require('bem/node_modules/q-fs'),
DEPS = require('bem/lib/techs/deps.js'),
PATH = require('path');

/**
Expand Down Expand Up @@ -26,7 +27,13 @@ exports.transformBuildDecl = function(decl) {
return val;
});

return tests.length ? { deps: tests } : decl;
if(tests.length) {
var deps = new DEPS.Deps();
deps.parse(tests);
return { deps: deps.serialize()[''][''] };
} else {
return decl;
}
});
};

Expand Down

2 comments on commit b2bf835

@narqo
Copy link
Owner

@narqo narqo commented on b2bf835 Jul 30, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dfilatov

А оно точно чинит bem/bem-core#156 (comment)?

@dfilatov
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не знаю, но у нас без этого тесты от модификатора вообще не попадали в сборку.

Please sign in to comment.