@@ -1481,6 +1481,48 @@ namespace ts.projectSystem {
1481
1481
] ) ;
1482
1482
} ) ;
1483
1483
1484
+ it ( "synchronizeProjectList returns correct information when base configuration file cannot be resolved" , ( ) => {
1485
+ const file : File = {
1486
+ path : `${ tscWatch . projectRoot } /index.ts` ,
1487
+ content : "export const foo = 5;"
1488
+ } ;
1489
+ const config : File = {
1490
+ path : `${ tscWatch . projectRoot } /tsconfig.json` ,
1491
+ content : JSON . stringify ( { extends : "./tsconfig_base.json" } )
1492
+ } ;
1493
+ const host = createServerHost ( [ file , config , libFile ] ) ;
1494
+ const projectService = createProjectService ( host ) ;
1495
+ projectService . openClientFile ( file . path ) ;
1496
+ const knownProjects = projectService . synchronizeProjectList ( [ ] , /*includeProjectReferenceRedirectInfo*/ false ) ;
1497
+ assert . deepEqual ( knownProjects [ 0 ] . files , [
1498
+ libFile . path ,
1499
+ file . path ,
1500
+ config . path ,
1501
+ `${ tscWatch . projectRoot } /tsconfig_base.json` ,
1502
+ ] ) ;
1503
+ } ) ;
1504
+
1505
+ it ( "synchronizeProjectList returns correct information when base configuration file cannot be resolved and redirect info is requested" , ( ) => {
1506
+ const file : File = {
1507
+ path : `${ tscWatch . projectRoot } /index.ts` ,
1508
+ content : "export const foo = 5;"
1509
+ } ;
1510
+ const config : File = {
1511
+ path : `${ tscWatch . projectRoot } /tsconfig.json` ,
1512
+ content : JSON . stringify ( { extends : "./tsconfig_base.json" } )
1513
+ } ;
1514
+ const host = createServerHost ( [ file , config , libFile ] ) ;
1515
+ const projectService = createProjectService ( host ) ;
1516
+ projectService . openClientFile ( file . path ) ;
1517
+ const knownProjects = projectService . synchronizeProjectList ( [ ] , /*includeProjectReferenceRedirectInfo*/ true ) ;
1518
+ assert . deepEqual ( knownProjects [ 0 ] . files , [
1519
+ { fileName : libFile . path , isSourceOfProjectReferenceRedirect : false } ,
1520
+ { fileName : file . path , isSourceOfProjectReferenceRedirect : false } ,
1521
+ { fileName : config . path , isSourceOfProjectReferenceRedirect : false } ,
1522
+ { fileName : `${ tscWatch . projectRoot } /tsconfig_base.json` , isSourceOfProjectReferenceRedirect : false } ,
1523
+ ] ) ;
1524
+ } ) ;
1525
+
1484
1526
it ( "handles delayed directory watch invoke on file creation" , ( ) => {
1485
1527
const projectRootPath = "/users/username/projects/project" ;
1486
1528
const fileB : File = {
0 commit comments