File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
packages/schematics/angular/application Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ function addDependenciesToPackageJson(options: ApplicationOptions): Rule {
187187 ) ;
188188 }
189189
190- if ( ! options . skipTests ) {
190+ if ( ! options . skipTests && ! options . minimal ) {
191191 rules . push ( ...addTestRunnerDependencies ( options . testRunner , ! ! options . skipInstall ) ) ;
192192 }
193193
Original file line number Diff line number Diff line change @@ -167,6 +167,18 @@ describe('Application Schematic', () => {
167167 ) ;
168168 } ) ;
169169
170+ it ( `should not add test dependencies with "minimal" enabled` , async ( ) => {
171+ const tree = await schematicRunner . runSchematic (
172+ 'application' ,
173+ { ...defaultOptions , minimal : true } ,
174+ workspaceTree ,
175+ ) ;
176+
177+ const packageJson = JSON . parse ( tree . readContent ( 'package.json' ) ) ;
178+ expect ( packageJson . devDependencies [ 'vitest' ] ) . toBeUndefined ( ) ;
179+ expect ( packageJson . devDependencies [ 'jsdom' ] ) . toBeUndefined ( ) ;
180+ } ) ;
181+
170182 it ( 'should install npm dependencies when `skipInstall` is false' , async ( ) => {
171183 await schematicRunner . runSchematic (
172184 'application' ,
You can’t perform that action at this time.
0 commit comments