Skip to content

Commit

Permalink
Test testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sondr3 committed May 23, 2016
1 parent 9b180fa commit 64425a1
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"repository": "sondr3/generator-jekyllized",
"license": "MIT",
"scripts": {
"test": "xo && nyc ava --serial"
"test": "node temp-test.js"
},
"files": [
"index.js",
Expand Down
45 changes: 45 additions & 0 deletions temp-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
'use strict';
var path = require('path');
var assert = require('yeoman-assert');
var helpers = require('yeoman-test');

helpers.run(path.join(__dirname, 'generators/app'))
.withPrompts({
projectName: 'jekyllized',
projectDescription: 'Test site for Jekyllized',
projectURL: 'www.test.com',
authorName: 'Ola Nordmann',
authorEmail: 'ola.nordmann\@gmail.com',
authorBio: 'A norwegian dude',
uploading: 'None',
jekyllPermalinks: 'pretty'
})
.toPromise()
.then(function () {
test.serial('generates expected files', () => {
assert.file([
'.editorconfig',
'.gitignore',
'.gitattributes',
'package.json',
'gulpfile.js',
'README.md',
'_config.yml',
'_config.build.yml',
'Gemfile'
]);
});

test.serial('creates package.json correctly', () => {
assert.file('package.json');
[
'"name": "jekyllized"',
'"description": "Test site for Jekyllized"',
'"homepage": "www.test.com',
'"name": "Ola Nordmann"',
'"email": "[email protected]"'
].forEach(field => {
assert.fileContent('package.json', field);
});
});
});

0 comments on commit 64425a1

Please sign in to comment.