@@ -195,7 +195,7 @@ describe('perform_compile', () => {
195195 } ) ) ;
196196 } ) ;
197197
198- it ( 'should merge tsconfig "angularCompilerOptions" when extends is an array ' , ( ) => {
198+ it ( 'should merge tsconfig "angularCompilerOptions" when extends is aarray ' , ( ) => {
199199 support . writeFiles ( {
200200 'tsconfig-level-1.json' : `{
201201 "extends": [
@@ -242,4 +242,50 @@ describe('perform_compile', () => {
242242 skipMetadataEmit : false ,
243243 } ) ) ;
244244 } ) ;
245+
246+ it ( `should not deep merge objects. (Ex: 'paths' and 'extendedDiagnostics')` , ( ) => {
247+ support . writeFiles ( {
248+ 'tsconfig-level-1.json' : `{
249+ "extends": "./tsconfig-level-2.json",
250+ "compilerOptions": {
251+ "paths": {
252+ "@angular/core": ["/*"]
253+ }
254+ },
255+ "angularCompilerOptions": {
256+ "extendedDiagnostics": {
257+ "checks": {
258+ "textAttributeNotBinding": "suppress"
259+ }
260+ }
261+ }
262+ }
263+ ` ,
264+ 'tsconfig-level-2.json' : `{
265+ "compilerOptions": {
266+ "strict": false,
267+ "paths": {
268+ "@angular/common": ["/*"]
269+ }
270+ },
271+ "angularCompilerOptions": {
272+ "skipMetadataEmit": true,
273+ "extendedDiagnostics": {
274+ "checks": {
275+ "nullishCoalescingNotNullable": "suppress"
276+ }
277+ }
278+ }
279+ }
280+ ` ,
281+ } ) ;
282+
283+ const { options} = readConfiguration ( path . resolve ( basePath , 'tsconfig-level-1.json' ) ) ;
284+ expect ( options ) . toEqual ( jasmine . objectContaining ( {
285+ strict : false ,
286+ skipMetadataEmit : true ,
287+ extendedDiagnostics : { checks : { textAttributeNotBinding : 'suppress' } } ,
288+ paths : { '@angular/core' : [ '/*' ] }
289+ } ) ) ;
290+ } ) ;
245291} ) ;
0 commit comments