@@ -36,16 +36,14 @@ describe('Acceptance: ng generate module', function () {
3636 return ng ( [ 'generate' , 'module' , 'my-module' ] ) . then ( ( ) => {
3737 expect ( existsSync ( path . join ( testPath , 'my-module' , 'my-module.module.ts' ) ) ) . to . equal ( true ) ;
3838 expect ( existsSync ( path . join ( testPath , 'my-module' , 'my-module.module.spec.ts' ) ) ) . to . equal ( false ) ;
39- expect ( existsSync ( path . join ( testPath , 'my-module' , 'my-module.component.ts' ) ) ) . to . equal ( false ) ;
4039 } ) ;
4140 } ) ;
4241
43- it ( 'ng generate module generate routing and component files when passed flag --routing' , function ( ) {
42+ it ( 'ng generate module generate routing file when passed flag --routing' , function ( ) {
4443 return ng ( [ 'generate' , 'module' , 'my-module' , '--routing' ] ) . then ( ( ) => {
4544 expect ( existsSync ( path . join ( testPath , 'my-module' , 'my-module.module.ts' ) ) ) . to . equal ( true ) ;
4645 expect ( existsSync ( path . join ( testPath , 'my-module' , 'my-module-routing.module.ts' ) ) ) . to . equal ( true ) ;
4746 expect ( existsSync ( path . join ( testPath , 'my-module' , 'my-module.module.spec.ts' ) ) ) . to . equal ( false ) ;
48- expect ( existsSync ( path . join ( testPath , 'my-module' , 'my-module.component.ts' ) ) ) . to . equal ( true ) ;
4947 } )
5048 } ) ;
5149
@@ -68,7 +66,6 @@ describe('Acceptance: ng generate module', function () {
6866 ng ( [ 'generate' , 'module' , 'parent/child' ] ) . then ( ( ) => {
6967 expect ( existsSync ( path . join ( testPath , 'parent/child' , 'child.module.ts' ) ) ) . to . equal ( true ) ;
7068 expect ( existsSync ( path . join ( testPath , 'parent/child' , 'child.module.spec.ts' ) ) ) . to . equal ( false ) ;
71- expect ( existsSync ( path . join ( testPath , 'parent/child' , 'child.component.ts' ) ) ) . to . equal ( false ) ;
7269 } )
7370 ) ;
7471 } ) ;
@@ -82,12 +79,11 @@ describe('Acceptance: ng generate module', function () {
8279 ng ( [ 'generate' , 'module' , 'child' ] ) . then ( ( ) => {
8380 expect ( existsSync ( path . join ( testPath , 'sub-dir/child' , 'child.module.ts' ) ) ) . to . equal ( true ) ;
8481 expect ( existsSync ( path . join ( testPath , 'sub-dir/child' , 'child.module.spec.ts' ) ) ) . to . equal ( false ) ;
85- expect ( existsSync ( path . join ( testPath , 'sub-dir/child' , 'child.component.ts' ) ) ) . to . equal ( false ) ;
8682 } )
8783 ) ;
8884 } ) ;
8985
90- it ( 'ng generate module child should work in sub-dir with routing and component files when passed --routing flag' , function ( ) {
86+ it ( 'ng generate module child should work in sub-dir with routing file when passed --routing flag' , function ( ) {
9187 fs . mkdirSync ( path . join ( testPath , './sub-dir' ) ) ;
9288 return new Promise ( resolve => {
9389 process . chdir ( path . join ( testPath , './sub-dir' ) ) ;
@@ -97,18 +93,16 @@ describe('Acceptance: ng generate module', function () {
9793 expect ( existsSync ( path . join ( testPath , 'sub-dir/child' , 'child.module.ts' ) ) ) . to . equal ( true ) ;
9894 expect ( existsSync ( path . join ( testPath , 'sub-dir/child' , 'child-routing.module.ts' ) ) ) . to . equal ( true ) ;
9995 expect ( existsSync ( path . join ( testPath , 'sub-dir/child' , 'child.module.spec.ts' ) ) ) . to . equal ( false ) ;
100- expect ( existsSync ( path . join ( testPath , 'sub-dir/child' , 'child.component.ts' ) ) ) . to . equal ( true ) ;
10196 } )
10297 ) ;
10398 } ) ;
10499
105- it ( 'ng generate module should generate parent/child module with routing and component files when passed --routing flag' , function ( ) {
100+ it ( 'ng generate module should generate parent/child module with routing file when passed --routing flag' , function ( ) {
106101 return ng ( [ 'generate' , 'module' , 'parent' ] ) . then ( ( ) =>
107102 ng ( [ 'generate' , 'module' , 'parent/child' , '--routing' ] ) . then ( ( ) => {
108103 expect ( existsSync ( path . join ( testPath , 'parent/child' , 'child.module.ts' ) ) ) . to . equal ( true ) ;
109104 expect ( existsSync ( path . join ( testPath , 'parent/child' , 'child-routing.module.ts' ) ) ) . to . equal ( true ) ;
110105 expect ( existsSync ( path . join ( testPath , 'parent/child' , 'child.module.spec.ts' ) ) ) . to . equal ( false ) ;
111- expect ( existsSync ( path . join ( testPath , 'parent/child' , 'child.component.ts' ) ) ) . to . equal ( true ) ;
112106 } )
113107 ) ;
114108 } ) ;
0 commit comments