You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
700 B
31 lines
700 B
'use strict';
|
|
|
|
var layoutsManager = require('../tasks/lib/layouts_manager');
|
|
|
|
exports.layouts_manager = {
|
|
|
|
defaultLayouts: function(test) {
|
|
test.expect(2);
|
|
|
|
var byTypeLayout = layoutsManager.getLayout('byType');
|
|
test.equal(byTypeLayout('js', 'bootstrap'), 'js/bootstrap');
|
|
|
|
var byComponentLayout = layoutsManager.getLayout('byComponent');
|
|
test.equal(byComponentLayout('sass', 'bourbone'), 'bourbone/sass');
|
|
|
|
test.done();
|
|
},
|
|
|
|
customLayout: function(test) {
|
|
test.expect(1);
|
|
|
|
var customLayout = layoutsManager.getLayout(function(type, pkg) {
|
|
return type + pkg;
|
|
});
|
|
|
|
test.equal(customLayout('img', 'logo.png'), 'imglogo.png');
|
|
|
|
test.done();
|
|
}
|
|
|
|
};
|