@@ -473,7 +473,15 @@ namespace ts.projectSystem {
473
473
installer . installAll ( /*expectedCount*/ 1 ) ;
474
474
475
475
checkNumberOfProjects ( projectService , { externalProjects : 1 } ) ;
476
- checkProjectActualFiles ( p , [ file1 . path , file2 . path , file3 . path , commander . path , express . path , jquery . path , moment . path ] ) ;
476
+ host . checkTimeoutQueueLength ( 2 ) ;
477
+ host . runQueuedTimeoutCallbacks ( ) ;
478
+ checkNumberOfProjects ( projectService , { externalProjects : 1 } ) ;
479
+ // Commander: Existed as a JS file
480
+ // JQuery: Specified in 'include'
481
+ // Moment: Specified in 'include'
482
+ // Express: Specified in package.json
483
+ // lodash: Excluded (not present)
484
+ checkProjectActualFiles ( p , [ file3 . path , commander . path , express . path , jquery . path , moment . path ] ) ;
477
485
} ) ;
478
486
479
487
it ( "Throttle - delayed typings to install" , ( ) => {
@@ -552,7 +560,7 @@ namespace ts.projectSystem {
552
560
}
553
561
554
562
checkNumberOfProjects ( projectService , { externalProjects : 1 } ) ;
555
- checkProjectActualFiles ( p , [ lodashJs . path , commanderJs . path , file3 . path , commander . path , express . path , jquery . path , moment . path , lodash . path ] ) ;
563
+ checkProjectActualFiles ( p , [ file3 . path , commander . path , express . path , jquery . path , moment . path , lodash . path ] ) ;
556
564
} ) ;
557
565
558
566
it ( "Throttle - delayed run install requests" , ( ) => {
@@ -1050,11 +1058,12 @@ namespace ts.projectSystem {
1050
1058
const host = createServerHost ( [ app , jquery , chroma ] ) ;
1051
1059
const logger = trackingLogger ( ) ;
1052
1060
const result = JsTyping . discoverTypings ( host , logger . log , [ app . path , jquery . path , chroma . path ] , getDirectoryPath ( < Path > app . path ) , safeList , emptyMap , { enable : true } , emptyArray ) ;
1053
- assert . deepEqual ( logger . finish ( ) , [
1061
+ const finish = logger . finish ( ) ;
1062
+ assert . deepEqual ( finish , [
1054
1063
'Inferred typings from file names: ["jquery","chroma-js"]' ,
1055
1064
"Inferred typings from unresolved imports: []" ,
1056
1065
'Result: {"cachedTypingPaths":[],"newTypingNames":["jquery","chroma-js"],"filesToWatch":["/a/b/bower_components","/a/b/node_modules"]}' ,
1057
- ] ) ;
1066
+ ] , finish . join ( "\r\n" ) ) ;
1058
1067
assert . deepEqual ( result . newTypingNames , [ "jquery" , "chroma-js" ] ) ;
1059
1068
} ) ;
1060
1069
0 commit comments