File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
packages/schematics/angular Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,16 @@ describe('Application Schematic', () => {
136
136
expect ( content . rules [ 'component-selector' ] [ 2 ] ) . toMatch ( 'app' ) ;
137
137
} ) ;
138
138
139
+ it ( 'minimal=true should not create e2e project' , ( ) => {
140
+ const options = { ...defaultOptions , minimal : true } ;
141
+
142
+ const tree = schematicRunner . runSchematic ( 'application' , options , workspaceTree ) ;
143
+ const files = tree . files ;
144
+ expect ( files . indexOf ( '/projects/foo-e2e' ) ) . toEqual ( - 1 ) ;
145
+ const confContent = JSON . parse ( tree . readContent ( '/angular.json' ) ) ;
146
+ expect ( confContent . projects [ 'foo-e2e' ] ) . toBeUndefined ( ) ;
147
+ } ) ;
148
+
139
149
describe ( `update package.json` , ( ) => {
140
150
it ( `should add build-angular to devDependencies` , ( ) => {
141
151
const tree = schematicRunner . runSchematic ( 'application' , defaultOptions , workspaceTree ) ;
Original file line number Diff line number Diff line change @@ -65,4 +65,14 @@ describe('Ng New Schematic', () => {
65
65
expect ( files . indexOf ( '/bar/angular.json' ) ) . toBeGreaterThanOrEqual ( 0 ) ;
66
66
expect ( files . indexOf ( '/bar/src' ) ) . toBe ( - 1 ) ;
67
67
} ) ;
68
+
69
+ it ( 'minimal=true should not create e2e project' , ( ) => {
70
+ const options = { ...defaultOptions , minimal : true } ;
71
+
72
+ const tree = schematicRunner . runSchematic ( 'ng-new' , options ) ;
73
+ const files = tree . files ;
74
+ expect ( files . indexOf ( '/bar/e2e' ) ) . toEqual ( - 1 ) ;
75
+ const confContent = JSON . parse ( tree . readContent ( '/bar/angular.json' ) ) ;
76
+ expect ( confContent . projects [ 'foo-e2e' ] ) . toBeUndefined ( ) ;
77
+ } ) ;
68
78
} ) ;
You can’t perform that action at this time.
0 commit comments