@@ -36,16 +36,14 @@ describe('Acceptance: ng generate module', function () {
36
36
return ng ( [ 'generate' , 'module' , 'my-module' ] ) . then ( ( ) => {
37
37
expect ( existsSync ( path . join ( testPath , 'my-module' , 'my-module.module.ts' ) ) ) . to . equal ( true ) ;
38
38
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 ) ;
40
39
} ) ;
41
40
} ) ;
42
41
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 ( ) {
44
43
return ng ( [ 'generate' , 'module' , 'my-module' , '--routing' ] ) . then ( ( ) => {
45
44
expect ( existsSync ( path . join ( testPath , 'my-module' , 'my-module.module.ts' ) ) ) . to . equal ( true ) ;
46
45
expect ( existsSync ( path . join ( testPath , 'my-module' , 'my-module-routing.module.ts' ) ) ) . to . equal ( true ) ;
47
46
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 ) ;
49
47
} )
50
48
} ) ;
51
49
@@ -68,7 +66,6 @@ describe('Acceptance: ng generate module', function () {
68
66
ng ( [ 'generate' , 'module' , 'parent/child' ] ) . then ( ( ) => {
69
67
expect ( existsSync ( path . join ( testPath , 'parent/child' , 'child.module.ts' ) ) ) . to . equal ( true ) ;
70
68
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 ) ;
72
69
} )
73
70
) ;
74
71
} ) ;
@@ -82,12 +79,11 @@ describe('Acceptance: ng generate module', function () {
82
79
ng ( [ 'generate' , 'module' , 'child' ] ) . then ( ( ) => {
83
80
expect ( existsSync ( path . join ( testPath , 'sub-dir/child' , 'child.module.ts' ) ) ) . to . equal ( true ) ;
84
81
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 ) ;
86
82
} )
87
83
) ;
88
84
} ) ;
89
85
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 ( ) {
91
87
fs . mkdirSync ( path . join ( testPath , './sub-dir' ) ) ;
92
88
return new Promise ( resolve => {
93
89
process . chdir ( path . join ( testPath , './sub-dir' ) ) ;
@@ -97,18 +93,16 @@ describe('Acceptance: ng generate module', function () {
97
93
expect ( existsSync ( path . join ( testPath , 'sub-dir/child' , 'child.module.ts' ) ) ) . to . equal ( true ) ;
98
94
expect ( existsSync ( path . join ( testPath , 'sub-dir/child' , 'child-routing.module.ts' ) ) ) . to . equal ( true ) ;
99
95
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 ) ;
101
96
} )
102
97
) ;
103
98
} ) ;
104
99
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 ( ) {
106
101
return ng ( [ 'generate' , 'module' , 'parent' ] ) . then ( ( ) =>
107
102
ng ( [ 'generate' , 'module' , 'parent/child' , '--routing' ] ) . then ( ( ) => {
108
103
expect ( existsSync ( path . join ( testPath , 'parent/child' , 'child.module.ts' ) ) ) . to . equal ( true ) ;
109
104
expect ( existsSync ( path . join ( testPath , 'parent/child' , 'child-routing.module.ts' ) ) ) . to . equal ( true ) ;
110
105
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 ) ;
112
106
} )
113
107
) ;
114
108
} ) ;
0 commit comments