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 @@ -383,7 +383,7 @@ export default function (options: ApplicationOptions): Rule {
383383 ] ) , MergeStrategy . Overwrite ) ,
384384 addTsConfigProjectReferences ( [
385385 join ( appDir , 'tsconfig.app.json' ) ,
386- join ( appDir , 'tsconfig.spec.json' ) ,
386+ ... options . minimal ? [ ] : [ join ( appDir , 'tsconfig.spec.json' ) ] ,
387387 ] ) ,
388388 options . minimal ? noop ( ) : schematic ( 'e2e' , e2eOptions ) ,
389389 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