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 310
/
Copy pathbootstrap.js
69 lines (60 loc) · 1.94 KB
/
bootstrap.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
'use strict';
var path = require('path');
var helpers = require('yeoman-generator').test;
var assert = require('yeoman-assert');
describe('bootstrap', function () {
describe('general', function () {
before(function (done) {
helpers.run(path.join(__dirname, '../app'))
.inDir(path.join(__dirname, '.tmp'))
.withOptions({'skip-install': true})
.withPrompts({features: [
'includeBootstrap'
]})
.on('end', done);
});
it('adds Bootstrap dependency', function () {
assert.fileContent('bower.json', 'bootstrap');
});
it('doesn\'t explicitly add jQuery dependency', function () {
assert.noFileContent('bower.json', 'jquery');
});
it('adds Bootstrap paths to Gruntfile.js', function () {
assert.fileContent('Gruntfile.js', 'bootstrap');
});
it('adds HTML description', function () {
assert.fileContent('app/index.html', 'Bootstrap');
});
});
describe('with Sass', function () {
before(function (done) {
helpers.run(path.join(__dirname, '../app'))
.inDir(path.join(__dirname, '.tmp'))
.withOptions({'skip-install': true})
.withPrompts({features: [
'includeSass',
'includeBootstrap'
]})
.on('end', done);
});
it('uses Bootstrap Sass', function () {
assert.fileContent('bower.json', '"bootstrap-sass"');
assert.fileContent('Gruntfile.js', '/bootstrap-sass/');
});
});
describe('without Sass', function () {
before(function (done) {
helpers.run(path.join(__dirname, '../app'))
.inDir(path.join(__dirname, '.tmp'))
.withOptions({'skip-install': true})
.withPrompts({features: [
'includeBootstrap'
]})
.on('end', done);
});
it('uses regular Bootstrap', function () {
assert.fileContent('bower.json', '"bootstrap"');
assert.fileContent('Gruntfile.js', '/bootstrap/');
});
});
});