Skip to content

Commit 7329393

Browse files
Skip getModule E2E tests on in-box Windows PowerShell
CanSendGetModuleRequestAsync and CanSendGetModuleRequestForMissingModuleAsync were the only tests in LanguageServerProtocolMessageTests still using [SkippableFact]/[Fact] instead of [SkippableFactOnWindowsPowerShell]. After the rebase onto main's E2E harness changes (#2323), LSPTestsFixture no longer starts the server under in-box Windows PowerShell, so PsesLanguageClient is null on that leg. Every other test in the class skips at discovery time there; these two ran anyway and threw NullReferenceException. Decorate them with the same attribute so they skip at discovery alongside their siblings. The attribute keeps the SkippableFact discoverer, so the Constrained Language Mode Skip.If in CanSendGetModuleRequestAsync still works, and both tests continue to run on Linux, macOS, and the PowerShell 7 Windows legs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3ab4c88 commit 7329393

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ await PsesLanguageClient
13061306
Assert.Equal("Get-ChildItem | Where-Object Name | ForEach-Object Name", expandAliasResult.Text);
13071307
}
13081308

1309-
[SkippableFact]
1309+
[SkippableFactOnWindowsPowerShell]
13101310
public async Task CanSendGetModuleRequestAsync()
13111311
{
13121312
Skip.If(PsesStdioLanguageServerProcessHost.RunningInConstrainedLanguageMode,
@@ -1344,7 +1344,7 @@ await PsesLanguageClient
13441344
Assert.Equal(module.Version, pinned.Version);
13451345
}
13461346

1347-
[Fact]
1347+
[SkippableFactOnWindowsPowerShell]
13481348
public async Task CanSendGetModuleRequestForMissingModuleAsync()
13491349
{
13501350
PSModuleMessage module =

0 commit comments

Comments
 (0)