@@ -1030,12 +1030,19 @@ await PsesLanguageClient
10301030 } ) ;
10311031 }
10321032
1033- [ SkippableFact ]
1033+ [ Fact ]
10341034 public async Task CanSendCompletionAndCompletionResolveRequestAsync ( )
10351035 {
1036- Skip . If ( IsLinux , "This depends on the help system, which is flaky on Linux." ) ;
1037- Skip . If ( PsesStdioLanguageServerProcessHost . IsWindowsPowerShell , "This help system isn't updated in CI." ) ;
1038- string filePath = NewTestFile ( "Write-H" ) ;
1036+ await PsesLanguageClient
1037+ . SendRequest (
1038+ "evaluate" ,
1039+ new EvaluateRequestArguments
1040+ {
1041+ Expression = $ "Update-Help Microsoft.Powershell.Utility -SourcePath { s_binDir } ;"
1042+ } )
1043+ . ReturningVoid ( CancellationToken . None ) ;
1044+
1045+ string filePath = NewTestFile ( "Get-Date" ) ;
10391046
10401047 CompletionList completionItems = await PsesLanguageClient . TextDocument . RequestCompletion (
10411048 new CompletionParams
@@ -1048,28 +1055,28 @@ public async Task CanSendCompletionAndCompletionResolveRequestAsync()
10481055 } ) ;
10491056
10501057 CompletionItem completionItem = Assert . Single ( completionItems ,
1051- completionItem1 => completionItem1 . FilterText == "Write-Host " ) ;
1058+ completionItem1 => completionItem1 . FilterText == "Get-Date " ) ;
10521059
10531060 CompletionItem updatedCompletionItem = await PsesLanguageClient
10541061 . SendRequest ( "completionItem/resolve" , completionItem )
10551062 . Returning < CompletionItem > ( CancellationToken . None ) ;
10561063
1057- Assert . Contains ( "Writes customized output to a host " , updatedCompletionItem . Documentation . String ) ;
1064+ Assert . Contains ( "Gets the current date and time. " , updatedCompletionItem . Documentation . String ) ;
10581065 }
10591066
1060- [ SkippableFact ( Skip = "Completion for Expand-SlowArchive is flaky." ) ]
1067+ [ Fact ]
10611068 public async Task CanSendCompletionResolveWithModulePrefixRequestAsync ( )
10621069 {
10631070 await PsesLanguageClient
10641071 . SendRequest (
10651072 "evaluate" ,
10661073 new EvaluateRequestArguments
10671074 {
1068- Expression = " Import-Module Microsoft.PowerShell.Archive -Prefix Slow "
1075+ Expression = $ "Update-Help Microsoft.Powershell.Utility -SourcePath { s_binDir } ; Import-Module Microsoft.PowerShell.Utility -Prefix Test -Force "
10691076 } )
10701077 . ReturningVoid ( CancellationToken . None ) ;
10711078
1072- string filePath = NewTestFile ( "Expand-SlowArch " ) ;
1079+ string filePath = NewTestFile ( "Get-TestDate " ) ;
10731080
10741081 CompletionList completionItems = await PsesLanguageClient . TextDocument . RequestCompletion (
10751082 new CompletionParams
@@ -1078,17 +1085,15 @@ await PsesLanguageClient
10781085 {
10791086 Uri = DocumentUri . FromFileSystemPath ( filePath )
10801087 } ,
1081- Position = new Position ( line : 0 , character : 15 )
1088+ Position = new Position ( line : 0 , character : 12 )
10821089 } ) ;
10831090
10841091 CompletionItem completionItem = Assert . Single ( completionItems ,
1085- completionItem1 => completionItem1 . Label == "Expand-SlowArchive " ) ;
1092+ completionItem1 => completionItem1 . Label == "Get-TestDate " ) ;
10861093
1087- CompletionItem updatedCompletionItem = await PsesLanguageClient
1088- . SendRequest ( "completionItem/resolve" , completionItem )
1089- . Returning < CompletionItem > ( CancellationToken . None ) ;
1094+ CompletionItem updatedCompletionItem = await PsesLanguageClient . ResolveCompletion ( completionItem ) ;
10901095
1091- Assert . Contains ( "Extracts files from a specified archive " , updatedCompletionItem . Documentation . String ) ;
1096+ Assert . Contains ( "Gets the current date and time. " , updatedCompletionItem . Documentation . String ) ;
10921097 }
10931098
10941099 [ SkippableFact ]
@@ -1123,22 +1128,21 @@ public async Task CanSendSignatureHelpRequestAsync()
11231128 {
11241129 string filePath = NewTestFile ( "Get-Date -" ) ;
11251130
1126- SignatureHelp signatureHelp = await PsesLanguageClient
1127- . SendRequest (
1128- "textDocument/signatureHelp" ,
1129- new SignatureHelpParams
1131+ SignatureHelp signatureHelp = await PsesLanguageClient . RequestSignatureHelp
1132+ (
1133+ new SignatureHelpParams
1134+ {
1135+ TextDocument = new TextDocumentIdentifier
11301136 {
1131- TextDocument = new TextDocumentIdentifier
1132- {
1133- Uri = new Uri ( filePath )
1134- } ,
1135- Position = new Position
1136- {
1137- Line = 0 ,
1138- Character = 10
1139- }
1140- } )
1141- . Returning < SignatureHelp > ( CancellationToken . None ) ;
1137+ Uri = new Uri ( filePath )
1138+ } ,
1139+ Position = new Position
1140+ {
1141+ Line = 0 ,
1142+ Character = 10
1143+ }
1144+ }
1145+ ) ;
11421146
11431147 Assert . Contains ( "Get-Date" , signatureHelp . Signatures . First ( ) . Label ) ;
11441148 }
@@ -1231,7 +1235,7 @@ await PsesLanguageClient
12311235 Assert . Equal ( 0 , evaluateResponseBody . VariablesReference ) ;
12321236 }
12331237
1234- [ SkippableFact ]
1238+ [ Fact ( Timeout = 60000 ) ]
12351239 public async Task CanSendGetCommandRequestAsync ( )
12361240 {
12371241 Skip . If ( Environment . GetEnvironmentVariable ( "TF_BUILD" ) is not null ,
0 commit comments