This repository was archived by the owner on Apr 24, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,9 @@ var expected = [
86
86
87
87
] ;
88
88
89
- describe ( 'init generator' , function ( ) {
89
+
90
+ // ---- Main generator
91
+ describe ( 'main generator' , function ( ) {
90
92
91
93
beforeEach ( function ( done ) {
92
94
helpers . testDirectory ( path . join ( __dirname , 'temp' ) , function ( err ) {
@@ -166,3 +168,35 @@ describe('init generator', function () {
166
168
} ) ;
167
169
168
170
} ) ;
171
+
172
+ // ---- Page sub-generator
173
+
174
+ describe ( 'page sub-generator' , function ( ) {
175
+ beforeEach ( function ( done ) {
176
+ helpers . testDirectory ( path . join ( __dirname , 'temp' ) , function ( err ) {
177
+ if ( err ) {
178
+ return done ( err ) ;
179
+ }
180
+
181
+ this . app = helpers . createGenerator ( 'init:page' , [
182
+ '../../page'
183
+ ] , [ 'test-page' ] ) ;
184
+ done ( ) ;
185
+ } . bind ( this ) ) ;
186
+ } ) ;
187
+
188
+ it ( 'creates expected files for the page sub-generator' , function ( done ) {
189
+
190
+ var expectedSCSS = [
191
+ 'templates/test-page.html'
192
+ ] ;
193
+
194
+ this . app . options [ 'skip-install' ] = true ;
195
+ this . app . run ( { } , function ( ) {
196
+ helpers . assertFiles ( expectedSCSS ) ;
197
+ done ( ) ;
198
+ } ) ;
199
+
200
+ } ) ;
201
+
202
+ } ) ;
You can’t perform that action at this time.
0 commit comments