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.

30 lines
700 B

  1. 'use strict';
  2. var layoutsManager = require('../tasks/lib/layouts_manager');
  3. exports.layouts_manager = {
  4. defaultLayouts: function(test) {
  5. test.expect(2);
  6. var byTypeLayout = layoutsManager.getLayout('byType');
  7. test.equal(byTypeLayout('js', 'bootstrap'), 'js/bootstrap');
  8. var byComponentLayout = layoutsManager.getLayout('byComponent');
  9. test.equal(byComponentLayout('sass', 'bourbone'), 'bourbone/sass');
  10. test.done();
  11. },
  12. customLayout: function(test) {
  13. test.expect(1);
  14. var customLayout = layoutsManager.getLayout(function(type, pkg) {
  15. return type + pkg;
  16. });
  17. test.equal(customLayout('img', 'logo.png'), 'imglogo.png');
  18. test.done();
  19. }
  20. };