-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtest-file-creation.js
executable file
·61 lines (56 loc) · 1.64 KB
/
test-file-creation.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
/*global describe:true, beforeEach:true, it:true */
'use strict';
var path = require('path');
var helpers = require('yeoman-generator').test;
var assert = require('assert');
describe('Zurb Foundation generator', function () {
beforeEach(function (done) {
helpers.testDirectory(path.join(__dirname, './temp'), function (err) {
if (err) {
return done(err);
}
this.foundation = {};
this.foundation.app = helpers.createGenerator('zurb-foundation:app', [
'../../app', [
helpers.createDummyGenerator(),
'mocha:app'
]
]);
done();
}.bind(this));
});
it('generator can be required without throwing', function () {
// not testing the actual run of generators yet
this.all = require('../app');
});
it('should generate dotfiles', function (done) {
// FIXME: Remove the Gruntfile.js created by the test.before function
var expected = [
['package.json', /"name": "temp"/],
'app/404.html',
'app/favicon.ico',
'app/robots.txt',
'app/index.html',
'app/.htaccess',
'.bowerrc',
'.gitignore',
'.gitattributes',
'.jshintrc',
'.editorconfig',
'Gruntfile.js',
'app/scripts/app.js',
'app/scripts/main.js',
'app/scripts/libs/custom.modernizr.js'
'app/scripts/libs/jquery.js'
'app/scripts/libs/require.js'
'app/scripts/libs/zepto.js'
'app/styles/foundation.css',
'app/styles/normalize.css'
];
this.foundation.app.options['skip-install'] = true;
this.foundation.app.run({}, function () {
helpers.assertFiles(expected);
done();
});
});
});