@@ -44,6 +44,8 @@ namespace ts.projectSystem {
4444 } ) ;
4545 }
4646
47+ import typingsName = server . typingsInstaller . typingsName ;
48+
4749 describe ( "typingsInstaller" , ( ) => {
4850 it ( "configured projects (typings installed) 1" , ( ) => {
4951 const file1 = {
@@ -519,32 +521,32 @@ namespace ts.projectSystem {
519521 const commander = {
520522 path : "/a/data/node_modules/@types/commander/index.d.ts" ,
521523 content : "declare const commander: { x: number }" ,
522- typings : "@types/ commander"
524+ typings : typingsName ( " commander")
523525 } ;
524526 const jquery = {
525527 path : "/a/data/node_modules/@types/jquery/index.d.ts" ,
526528 content : "declare const jquery: { x: number }" ,
527- typings : "@types/ jquery"
529+ typings : typingsName ( " jquery")
528530 } ;
529531 const lodash = {
530532 path : "/a/data/node_modules/@types/lodash/index.d.ts" ,
531533 content : "declare const lodash: { x: number }" ,
532- typings : "@types/ lodash"
534+ typings : typingsName ( " lodash")
533535 } ;
534536 const cordova = {
535537 path : "/a/data/node_modules/@types/cordova/index.d.ts" ,
536538 content : "declare const cordova: { x: number }" ,
537- typings : "@types/ cordova"
539+ typings : typingsName ( " cordova")
538540 } ;
539541 const grunt = {
540542 path : "/a/data/node_modules/@types/grunt/index.d.ts" ,
541543 content : "declare const grunt: { x: number }" ,
542- typings : "@types/ grunt"
544+ typings : typingsName ( " grunt")
543545 } ;
544546 const gulp = {
545547 path : "/a/data/node_modules/@types/gulp/index.d.ts" ,
546548 content : "declare const gulp: { x: number }" ,
547- typings : "@types/ gulp"
549+ typings : typingsName ( " gulp")
548550 } ;
549551
550552 const host = createServerHost ( [ lodashJs , commanderJs , file3 ] ) ;
@@ -554,7 +556,7 @@ namespace ts.projectSystem {
554556 }
555557 installWorker ( _requestId : number , args : string [ ] , _cwd : string , cb : TI . RequestCompletedAction ) : void {
556558 let typingFiles : ( FileOrFolder & { typings : string } ) [ ] = [ ] ;
557- if ( args . indexOf ( "@types/ commander") >= 0 ) {
559+ if ( args . indexOf ( typingsName ( " commander") ) >= 0 ) {
558560 typingFiles = [ commander , jquery , lodash , cordova ] ;
559561 }
560562 else {
@@ -982,7 +984,7 @@ namespace ts.projectSystem {
982984 return ;
983985 }
984986 if ( response . kind === server . EventEndInstallTypes ) {
985- assert . deepEqual ( response . packagesToInstall , [ "@types/ commander"] ) ;
987+ assert . deepEqual ( response . packagesToInstall , [ typingsName ( " commander") ] ) ;
986988 seenTelemetryEvent = true ;
987989 return ;
988990 }
0 commit comments