File tree 2 files changed +15
-1
lines changed
packages/schematics/src/collection/application
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,17 @@ describe('app', () => {
303
303
'apps/my-app/tsconfig.app.json' ,
304
304
'apps/my-app/tsconfig.spec.json'
305
305
] ) ;
306
+ const tsconfigAppJson = readJsonInTree (
307
+ tree ,
308
+ 'apps/my-app/tsconfig.app.json'
309
+ ) ;
310
+ expect ( tsconfigAppJson . exclude ) . toEqual ( [
311
+ 'src/test-setup.ts' ,
312
+ '**/*.spec.ts'
313
+ ] ) ;
314
+ expect ( tsconfigAppJson . compilerOptions . outDir ) . toEqual (
315
+ '../../dist/out-tsc/apps/my-app'
316
+ ) ;
306
317
} ) ;
307
318
} ) ;
308
319
Original file line number Diff line number Diff line change @@ -175,7 +175,6 @@ function updateProject(options: NormalizedSchema): Rule {
175
175
return json ;
176
176
} ) ,
177
177
updateJsonInTree ( `${ options . appProjectRoot } /tsconfig.app.json` , json => {
178
- json . exclude = json . exclude || [ ] ;
179
178
return {
180
179
...json ,
181
180
extends : `${ offsetFromRoot ( options . appProjectRoot ) } tsconfig.json` ,
@@ -185,6 +184,10 @@ function updateProject(options: NormalizedSchema): Rule {
185
184
options . appProjectRoot
186
185
} `
187
186
} ,
187
+ exclude :
188
+ options . unitTestRunner === 'jest'
189
+ ? [ 'src/test-setup.ts' , '**/*.spec.ts' ]
190
+ : json . exclude || [ ] ,
188
191
include : [ '**/*.ts' ]
189
192
} ;
190
193
} ) ,
You can’t perform that action at this time.
0 commit comments