File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1184,6 +1184,28 @@ namespace ts.projectSystem {
11841184 checkNumberOfInferredProjects ( projectService , 0 ) ;
11851185 } ) ;
11861186
1187+ it ( "external project for dynamic file" , ( ) => {
1188+ const file1 = {
1189+ path : "/a/b/f1.ts" ,
1190+ content : "let x =1;"
1191+ } ;
1192+ const externalProjectName = "^ScriptDocument1 file1.ts" ;
1193+ const externalFiles = toExternalFiles ( [ "^ScriptDocument1 file1.ts" ] ) ;
1194+ const host = createServerHost ( [ file1 ] ) ;
1195+ const projectService = createProjectService ( host ) ;
1196+ projectService . openExternalProject ( {
1197+ rootFiles : externalFiles ,
1198+ options : { } ,
1199+ projectFileName : externalProjectName
1200+ } ) ;
1201+
1202+ checkNumberOfExternalProjects ( projectService , 1 ) ;
1203+ checkNumberOfInferredProjects ( projectService , 0 ) ;
1204+
1205+ externalFiles [ 0 ] . content = "let x =1;" ;
1206+ projectService . applyChangesInOpenFiles ( externalFiles , [ ] , [ ] ) ;
1207+ } ) ;
1208+
11871209 it ( "external project that included config files" , ( ) => {
11881210 const file1 = {
11891211 path : "/a/b/f1.ts" ,
You can’t perform that action at this time.
0 commit comments