This repository has been archived by the owner on May 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make jQuery optional if there's no Bootstrap
- Loading branch information
Showing
2 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
'use strict'; | ||
var path = require('path'); | ||
var helpers = require('yeoman-generator').test; | ||
var assert = require('yeoman-assert'); | ||
|
||
describe('jquery', function () { | ||
describe('on', function () { | ||
before(function (done) { | ||
helpers.run(path.join(__dirname, '../app')) | ||
.inDir(path.join(__dirname, '.tmp')) | ||
.withOptions({'skip-install': true}) | ||
.withPrompts({ | ||
features: [], | ||
includeJQuery: true | ||
}) | ||
.on('end', done); | ||
}); | ||
|
||
it('adds the bower dependency', function () { | ||
assert.fileContent('bower.json', '"jquery"'); | ||
}); | ||
}); | ||
|
||
describe('off', function () { | ||
before(function (done) { | ||
helpers.run(path.join(__dirname, '../app')) | ||
.inDir(path.join(__dirname, 'temp')) | ||
.withOptions({'skip-install': true}) | ||
.withPrompts({ | ||
features: [], | ||
includeJQuery: false | ||
}) | ||
.on('end', done); | ||
}); | ||
|
||
it('doesn\'t add the bower dependency', function () { | ||
assert.noFileContent('bower.json', '"jquery"'); | ||
}); | ||
}); | ||
}); |