Skip to content

Commit

Permalink
Complete test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehdy Dara committed Aug 28, 2015
1 parent e2f6d8b commit d8ead28
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions test/template/test-bower.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,22 @@ describe('gulp-angular bower template', function () {
var result = bower(model);
result.should.not.match(/bootstrap/);
result.should.not.match(/foundation/);
result.should.not.match(/material/);
result.should.not.match(/angular-material/);
result.should.not.match(/material-design-lite/);

model.props.ui.key = 'angular-material';
result = bower(model);
result.should.match(/material/);
result.should.match(/angular-material/);
result.should.not.match(/boostrap/);
result.should.not.match(/foundation/);
result.should.not.match(/material-design-lite/);

model.props.ui.key = 'material-design-lite';
result = bower(model);
result.should.match(/material-design-lite/);
result.should.not.match(/boostrap/);
result.should.not.match(/angular-material/);
result.should.not.match(/foundation/);

model.props.ui.key = 'bootstrap';
model.props.bootstrapComponents.key = 'ui-bootstrap';
Expand All @@ -149,30 +158,34 @@ describe('gulp-angular bower template', function () {
result.should.match(/angular-bootstrap/);
result.should.not.match(/"bootstrap"/);
result.should.not.match(/foundation/);
result.should.not.match(/material/);
result.should.not.match(/angular-material/);
result.should.not.match(/material-design-lite/);

model.props.bootstrapComponents.key = 'angular-strap';
model.props.cssPreprocessor.extension = 'less';
result = bower(model);
result.should.match(/"bootstrap"/);
result.should.match(/angular-strap/);
result.should.not.match(/foundation/);
result.should.not.match(/material/);
result.should.not.match(/angular-material/);
result.should.not.match(/material-design-lite/);

model.props.bootstrapComponents.key = 'none';
model.props.cssPreprocessor.extension = 'styl';
result = bower(model);
result.should.match(/bootstrap-stylus/);
result.should.not.match(/foundation/);
result.should.not.match(/material/);
result.should.not.match(/angular-material/);
result.should.not.match(/material-design-lite/);

model.props.ui.key = 'foundation';
model.props.foundationComponents.key = 'angular-foundation';
result = bower(model);
result.should.match(/"foundation"/);
result.should.match(/angular-foundation/);
result.should.not.match(/bootstrap/);
result.should.not.match(/material/);
result.should.not.match(/angular-material/);
result.should.not.match(/material-design-lite/);
});

it('should add traceur runtime when needed', function() {
Expand Down

0 comments on commit d8ead28

Please sign in to comment.