File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
packages/schematics/angular/application Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -418,7 +418,7 @@ export default function (options: ApplicationOptions): Rule {
418418 ] ) , MergeStrategy . Overwrite ) ,
419419 addTsConfigProjectReferences ( [
420420 join ( appDir , 'tsconfig.app.json' ) ,
421- join ( appDir , 'tsconfig.spec.json' ) ,
421+ ... options . minimal ? [ ] : [ join ( appDir , 'tsconfig.spec.json' ) ] ,
422422 ] ) ,
423423 options . minimal ? noop ( ) : schematic ( 'e2e' , e2eOptions ) ,
424424 options . skipPackageJson ? noop ( ) : addDependenciesToPackageJson ( options ) ,
Original file line number Diff line number Diff line change @@ -91,6 +91,17 @@ describe('Application Schematic', () => {
9191 ] ) ;
9292 } ) ;
9393
94+ it ( 'minimal=true should add correct reference in tsconfig' , async ( ) => {
95+ const options = { ...defaultOptions , minimal : true } ;
96+ const tree = await schematicRunner . runSchematicAsync ( 'application' , options , workspaceTree )
97+ . toPromise ( ) ;
98+
99+ const { references } = readJsonFile ( tree , '/tsconfig.json' ) ;
100+ expect ( references ) . toEqual ( [
101+ { path : './projects/foo/tsconfig.app.json' } ,
102+ ] ) ;
103+ } ) ;
104+
94105 it ( 'should set the prefix to app if none is set' , async ( ) => {
95106 const options = { ...defaultOptions } ;
96107
You can’t perform that action at this time.
0 commit comments