Skip to content

Commit 64425a1

Browse files
committed
Test testing
1 parent 9b180fa commit 64425a1

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"repository": "sondr3/generator-jekyllized",
1414
"license": "MIT",
1515
"scripts": {
16-
"test": "xo && nyc ava --serial"
16+
"test": "node temp-test.js"
1717
},
1818
"files": [
1919
"index.js",

temp-test.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
'use strict';
2+
var path = require('path');
3+
var assert = require('yeoman-assert');
4+
var helpers = require('yeoman-test');
5+
6+
helpers.run(path.join(__dirname, 'generators/app'))
7+
.withPrompts({
8+
projectName: 'jekyllized',
9+
projectDescription: 'Test site for Jekyllized',
10+
projectURL: 'www.test.com',
11+
authorName: 'Ola Nordmann',
12+
authorEmail: 'ola.nordmann\@gmail.com',
13+
authorBio: 'A norwegian dude',
14+
uploading: 'None',
15+
jekyllPermalinks: 'pretty'
16+
})
17+
.toPromise()
18+
.then(function () {
19+
test.serial('generates expected files', () => {
20+
assert.file([
21+
'.editorconfig',
22+
'.gitignore',
23+
'.gitattributes',
24+
'package.json',
25+
'gulpfile.js',
26+
'README.md',
27+
'_config.yml',
28+
'_config.build.yml',
29+
'Gemfile'
30+
]);
31+
});
32+
33+
test.serial('creates package.json correctly', () => {
34+
assert.file('package.json');
35+
[
36+
'"name": "jekyllized"',
37+
'"description": "Test site for Jekyllized"',
38+
'"homepage": "www.test.com',
39+
'"name": "Ola Nordmann"',
40+
'"email": "[email protected]"'
41+
].forEach(field => {
42+
assert.fileContent('package.json', field);
43+
});
44+
});
45+
});

0 commit comments

Comments
 (0)