forked from sindresorhus/generator-electron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
45 lines (39 loc) · 880 Bytes
/
test.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
'use strict';
var path = require('path');
var helpers = require('yeoman-test');
var assert = require('yeoman-assert');
describe('generator', function () {
beforeEach(function (cb) {
var deps = ['../app'];
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
cb(err);
return;
}
this.generator = helpers.createGenerator('electron:app', deps, null, {skipInstall: true});
cb();
}.bind(this));
});
it('generates expected files', function (cb) {
var expected = [
'.editorconfig',
'.gitattributes',
'.gitignore',
'index.js',
'index.html',
'index.css',
'license',
'package.json',
'readme.md'
];
helpers.mockPrompt(this.generator, {
appName: 'test',
githubUsername: 'test',
website: 'test.com'
});
this.generator.run(function () {
assert.file(expected);
cb();
});
});
});