-
Notifications
You must be signed in to change notification settings - Fork 234
Run single test in Pester v5 #1167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run single test in Pester v5 #1167
Conversation
src/PowerShellEditorServices/Services/CodeLens/PesterCodeLensProvider.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/CodeLens/PesterCodeLensProvider.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/CodeLens/PesterCodeLensProvider.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs
Outdated
Show resolved
Hide resolved
This should be now good to go. When can I expect it in PowerShell and PowerShell Preview extension? |
Since we're in a crunch time to ship PSReadLine in the PowerShell stable extension, this will not make that. However, it will be in the next preview after that whi h will probably be a week or two after that goes out. So maybe by the end of the month. |
src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs
Outdated
Show resolved
Hide resolved
…rovider.cs Co-Authored-By: Robert Holt <[email protected]>
…Settings.cs Co-Authored-By: Robert Holt <[email protected]>
381eca1
to
1d949af
Compare
This should be good now. |
gah need to fix a test now :) |
|
Complexity increasing per file
==============================
- src/PowerShellEditorServices/Services/CodeLens/PesterCodeLensProvider.cs 1
Clones added
============
- test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs 14
See the complete overview on Codacy |
I've changed the verb to |
This shows the lense on every Describe \ Context and It.
To test this you need Pester v5 ( branch
filter-by-lines
or once mergedv5.0
), you will also need the updated extension from vscode-powershell repo (branch same as here). Once your VSCode is started with the new version (after running the extension by F5), open a .Tests.ps1 file and load Pester v5.WIP:Once merged this will show the menu for all versions of Pester are we able to somehow figure out the version of Pester beforehand and only use the new approach when Pester v5 is loaded?If not, should we add opt-in setting? Pester v5 is still far from ready, but I want to use this with beta which will be soon available 🙂Ready:
Added opt-in setting for Pester5 that will enable the code lens for all items, otherwise it will use the standard Describe-only lense. This old lense works for both Pester v4 and v5, it just does not take full potential of v5. l used an option, instead of trying to detect which Pester version would be loaded because I don't want to guess, and I also want to force loading of Pester v5 when the code lense for it is specified. Using the existion VSCode configuration infrastructure this can be enabled per workspace.