Replace Pester tests with xunit tests#1008
Merged
TylerLeonhardt merged 13 commits intoPowerShell:omnisharp-lspfrom Aug 19, 2019
Merged
Replace Pester tests with xunit tests#1008TylerLeonhardt merged 13 commits intoPowerShell:omnisharp-lspfrom
TylerLeonhardt merged 13 commits intoPowerShell:omnisharp-lspfrom
Conversation
Member
Author
|
Now the tests don't use a REPL which is probably ideal for our testing environment |
Member
Author
|
oops - I tried adding named pipe tests and no dice. Moving to stdio |
rjmholt
approved these changes
Aug 19, 2019
test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs
Outdated
Show resolved
Hide resolved
| PowerShellVersionDetails details | ||
| = await LanguageClient.SendRequest<PowerShellVersionDetails>("powerShell/getVersion", new GetVersionParams()); | ||
|
|
||
| if(Environment.GetEnvironmentVariable("PWSH_EXE_NAME") == "powershell") |
Contributor
There was a problem hiding this comment.
Worth making this a static?
| }); | ||
| } | ||
|
|
||
| [Fact(Skip = "Bug in Newtonsoft that csharp-language-server-protocol will workaround")] |
Contributor
There was a problem hiding this comment.
Possible to explain what the issue is and/or link to the issue here in a comment?
Member
Author
There was a problem hiding this comment.
They've fixed the issue :) and the tests are passing now!
Co-Authored-By: Robert Holt <rjmholt@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This replaces the Pester E2E tests with xunit E2E tests and uses all Omnisharp types (no reliance on PSES.Protocol!)
The biggest problem I had with the Pester tests was that it was so hard to debug them... and the programming model relied too much on timing things perfectly.
I've moved over to xUnit tests as the asynchronous nature of communicating with PSES proved to be really tough with PowerShell.
I think this new model is a little more stable and uses Omnisharp's client so the types are consistant with no reliance on our protocol project.
The tests do exactly what the Pester tests do, just using xunit instead.
This switches to starting PSES via
Stdiotesting that code path... It might be worthwhile to have aNamedPipesmoke test (that just connects and disconnects)... but that's out of scope for now.Also, that might have to use Pester because I was experiencing some hanging on Windows getting the NamedPipes working with xUnit.