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.
33 lines
762 B
33 lines
762 B
'use strict';
|
|
|
|
var path = require('path');
|
|
|
|
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'), path.normalize('js/bootstrap'));
|
|
|
|
var byComponentLayout = layoutsManager.getLayout('byComponent');
|
|
test.equal(byComponentLayout('sass', 'bourbone'), path.normalize('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();
|
|
}
|
|
|
|
};
|