@@ -244,7 +244,7 @@ namespace ts.projectSystem {
244
244
checkProjectActualFiles ( p , [ jqueryJs . path ] ) ;
245
245
246
246
installer . installAll ( /*expectedCount*/ 0 ) ;
247
- host . checkTimeoutQueueLengthAndRun ( 2 ) ;
247
+ host . checkTimeoutQueueLength ( 0 ) ;
248
248
checkNumberOfProjects ( projectService , { inferredProjects : 1 } ) ;
249
249
// files should not be removed from project if ATA is skipped
250
250
checkProjectActualFiles ( p , [ jqueryJs . path ] ) ;
@@ -1024,9 +1024,8 @@ namespace ts.projectSystem {
1024
1024
service . openClientFile ( f . path ) ;
1025
1025
1026
1026
installer . checkPendingCommands ( /*expectedCount*/ 0 ) ;
1027
-
1028
1027
host . writeFile ( fixedPackageJson . path , fixedPackageJson . content ) ;
1029
- host . checkTimeoutQueueLengthAndRun ( 2 ) ; // To refresh the project and refresh inferred projects
1028
+ host . checkTimeoutQueueLength ( 0 ) ;
1030
1029
// expected install request
1031
1030
installer . installAll ( /*expectedCount*/ 1 ) ;
1032
1031
host . checkTimeoutQueueLengthAndRun ( 2 ) ;
@@ -1212,7 +1211,8 @@ namespace ts.projectSystem {
1212
1211
}
1213
1212
} ;
1214
1213
session . executeCommand ( changeRequest ) ;
1215
- host . checkTimeoutQueueLengthAndRun ( 2 ) ; // This enqueues the updategraph and refresh inferred projects
1214
+ host . checkTimeoutQueueLength ( 0 ) ;
1215
+ proj . updateGraph ( ) ;
1216
1216
const version2 = proj . lastCachedUnresolvedImportsList ;
1217
1217
assert . strictEqual ( version1 , version2 , "set of unresolved imports should change" ) ;
1218
1218
} ) ;
@@ -1884,8 +1884,8 @@ namespace ts.projectSystem {
1884
1884
} ] ) ) ;
1885
1885
host . runQueuedTimeoutCallbacks ( ) ; // Update the graph
1886
1886
// Update the typing
1887
- host . checkTimeoutQueueLength ( 2 ) ;
1888
- assert . isTrue ( proj . resolutionCache . isFileWithInvalidatedNonRelativeUnresolvedImports ( app . path as Path ) ) ;
1887
+ host . checkTimeoutQueueLength ( 0 ) ;
1888
+ assert . isFalse ( proj . resolutionCache . isFileWithInvalidatedNonRelativeUnresolvedImports ( app . path as Path ) ) ;
1889
1889
}
1890
1890
1891
1891
it ( "correctly invalidate the resolutions with typing names" , ( ) => {
@@ -1947,7 +1947,7 @@ declare module "stream" {
1947
1947
executeCommand ( this , host , [ "node" ] , [ nodeTyping ] , cb ) ;
1948
1948
}
1949
1949
} ) ( ) ;
1950
- const projectService = createProjectService ( host , { typingsInstaller : installer , logger : createLoggerWritingToConsole ( ) } ) ;
1950
+ const projectService = createProjectService ( host , { typingsInstaller : installer } ) ;
1951
1951
projectService . openClientFile ( file . path ) ;
1952
1952
projectService . checkNumberOfProjects ( { inferredProjects : 1 } ) ;
1953
1953
@@ -1975,11 +1975,8 @@ declare module "stream" {
1975
1975
host . checkTimeoutQueueLengthAndRun ( 2 ) ;
1976
1976
checkProjectActualFiles ( proj , [ file . path , libFile . path , nodeTyping . path ] ) ;
1977
1977
1978
- // Here, since typings doesnt contain node typings and resolution fails and
1979
- // node typings go out of project,
1980
- // but because we handle core node modules when resolving from typings cache
1981
- // node typings are included in the project
1982
- host . checkTimeoutQueueLengthAndRun ( 2 ) ;
1978
+ // Here, since typings dont change, there is no timeout scheduled
1979
+ host . checkTimeoutQueueLength ( 0 ) ;
1983
1980
checkProjectActualFiles ( proj , [ file . path , libFile . path , nodeTyping . path ] ) ;
1984
1981
projectService . applyChangesInOpenFiles ( /*openFiles*/ undefined , arrayIterator ( [ {
1985
1982
fileName : file . path ,
@@ -1989,9 +1986,10 @@ declare module "stream" {
1989
1986
} ] )
1990
1987
} ] ) ) ;
1991
1988
proj . updateGraph ( ) ; // Update the graph
1989
+ checkProjectActualFiles ( proj , [ file . path , libFile . path , nodeTyping . path ] ) ;
1992
1990
// Update the typing
1993
- host . checkTimeoutQueueLength ( 2 ) ;
1994
- assert . isTrue ( proj . resolutionCache . isFileWithInvalidatedNonRelativeUnresolvedImports ( file . path as Path ) ) ;
1991
+ host . checkTimeoutQueueLength ( 0 ) ;
1992
+ assert . isFalse ( proj . resolutionCache . isFileWithInvalidatedNonRelativeUnresolvedImports ( file . path as Path ) ) ;
1995
1993
} ) ;
1996
1994
} ) ;
1997
1995
0 commit comments