-
Notifications
You must be signed in to change notification settings - Fork 76
Update VSCode page #315
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
Merged
Merged
Update VSCode page #315
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,38 @@ | ||
--- | ||
title: VSCode | ||
title: Visual Studio Code | ||
description: See how Visual Studio Code and its extensions helps you run and debug your Pester tests directly inside the editor | ||
--- | ||
|
||
### VSCode improvements | ||
Using Visual Studio Code with the latest [PowerShell extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell) provides a great experience for writing PowerShell code. The extension includes Pester-specific features to improve the way you write, run and debug Pester tests. | ||
|
||
#### Use legacy code lens | ||
### Code lens | ||
|
||
With Pester 5 it is finally possible to run and debug just a single test in VSCode! | ||
With the `Pester: Code Lens` setting enabled, VSCode will show `Run tests` or `Debug tests` links above your Pester blocks for quick execution. Starting with Pester 5 this also works on individual tests. You can even run tests that are marked as skipped by running them individually. | ||
fflaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
 | ||
|
||
In the latest [PowerShell](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell) extension for VSCode you can enable Use Legacy Code Lens option which will enable `Run tests` on all `Describe`, `Context` and `It` blocks. You can run a whole block, any child block, or any test individually. You can also run tests that are marked as skipped by running them individually. | ||
To enable the improved code lens for Pester 5 you need to disable the "Use Legacy Code Lens" setting which is enabled by default. | ||
|
||
Actually there is a bug, and the option is called Enable Legacy Code Lens, and is enabled by default and should be disabled for Pester 5. 😁 Take advantage of this and go try it right now! | ||
1. In Visual Studio Code, open **File | Preferences | Settings** (<kbd>⌘/Ctrl</kbd> + <kbd>,</kbd>) | ||
2. In the **Settings** window, navigate to the **Extensions | PowerShell** section. | ||
3. Uncheck the **Pester: Use Legacy Code Lens** checkbox. | ||
4. Close the **Settings** window. | ||
fflaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**Instructions:** In Visual Studio Code, select **File | Preferences | Settings** (or type **Ctrl+,**). In the **Settings** window, under the **User** tab, select **Extensions | PowerShell Configuration**. Uncheck the **Pester: Use Legacy Code Lens** checkbox. Close the **Settings** window. | ||
### Output verbosity | ||
|
||
You can control the output verbosity level in VSCode output, or let it inherit from PesterPreference. | ||
|
||
#### Output verbosity | ||
 | ||
|
||
You can specify verbosity in VSCode, to see normal or detailed output, or to take it from PesterPreference. This also works for Pester 4! | ||
### Navigation | ||
|
||
 | ||
Pester-blocks are recognized by the PowerShell-extension to simplify navigation in your test files. | ||
fflaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- The Outline panle shows an overview of your Pester-blocks.<br/> | ||
fflaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
 | ||
|
||
fflaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Your current location in easily identified using breadcrumbs or the sticky scroll features.<br/> | ||
fflaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
 | ||
|
||
fflaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- `Context`, `Describe` and `It` blocks are all searchable using Go to symbol commands.<br/> | ||
fflaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,38 @@ | ||
--- | ||
title: VSCode | ||
title: Visual Studio Code | ||
description: See how Visual Studio Code and its extensions helps you run and debug your Pester tests directly inside the editor | ||
--- | ||
|
||
### VSCode improvements | ||
Using Visual Studio Code with the latest [PowerShell extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell) provides a great experience for writing PowerShell code. The extension includes Pester-specific features to improve the way you write, run and debug Pester tests. | ||
|
||
#### Use legacy code lens | ||
### Code lens | ||
|
||
With Pester 5 it is finally possible to run and debug just a single test in VSCode! | ||
With the `Pester: Code Lens` setting enabled, VSCode will show `Run tests` or `Debug tests` links above your Pester blocks for quick execution. Starting with Pester 5 this also works on individual tests. You can even run tests that are marked as skipped by running them individually. | ||
|
||
 | ||
|
||
In the latest [PowerShell](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell) extension for VSCode you can enable Use Legacy Code Lens option which will enable `Run tests` on all `Describe`, `Context` and `It` blocks. You can run a whole block, any child block, or any test individually. You can also run tests that are marked as skipped by running them individually. | ||
To enable the improved code lens for Pester 5 you need to disable the "Use Legacy Code Lens" setting which is enabled by default. | ||
|
||
Actually there is a bug, and the option is called Enable Legacy Code Lens, and is enabled by default and should be disabled for Pester 5. 😁 Take advantage of this and go try it right now! | ||
1. In Visual Studio Code, open **File | Preferences | Settings** (<kbd>⌘/Ctrl</kbd> + <kbd>,</kbd>) | ||
2. In the **Settings** window, navigate to the **Extensions | PowerShell** section. | ||
3. Uncheck the **Pester: Use Legacy Code Lens** checkbox. | ||
4. Close the **Settings** window. | ||
|
||
#### Output verbosity | ||
### Output verbosity | ||
|
||
You can specify verbosity in VSCode, to see normal or detailed output, or to take it from PesterPreference. This also works for Pester 4! | ||
You can control the output verbosity level in VSCode output, or let it inherit from PesterPreference. | ||
|
||
 | ||
|
||
### Navigation | ||
|
||
Pester-blocks are recognized by the PowerShell-extension to simplify navigation in your test files. | ||
|
||
- The Outline panle shows an overview of your Pester-blocks.<br/> | ||
 | ||
|
||
- Your current location in easily identified using breadcrumbs or the sticky scroll features.<br/> | ||
 | ||
|
||
- `Context`, `Describe` and `It` blocks are all searchable using Go to symbol commands.<br/> | ||
 |
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.
Uh oh!
There was an error while loading. Please reload this page.