File tree 2 files changed +46
-1
lines changed 2 files changed +46
-1
lines changed Original file line number Diff line number Diff line change 13
13
"repository" : " sondr3/generator-jekyllized" ,
14
14
"license" : " MIT" ,
15
15
"scripts" : {
16
- "test" : " xo && nyc ava --serial "
16
+ "test" : " node temp-test.js "
17
17
},
18
18
"files" : [
19
19
" index.js" ,
Original file line number Diff line number Diff line change
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
+
41
+ ] . forEach ( field => {
42
+ assert . fileContent ( 'package.json' , field ) ;
43
+ } ) ;
44
+ } ) ;
45
+ } ) ;
You can’t perform that action at this time.
0 commit comments