You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Run single test
* Add options for code lens and verbosity
* Rename Pester options to enableLegacyCodeLens and outputVerbosity
* change to use
Co-authored-by: Tyler Leonhardt <[email protected]>
if ($MinimumVersion5-and$pesterModule.Version-lt"5.0.0") {
82
+
Write-Warning"Pester 5.0.0 or newer is required because setting PowerShell > Pester: Enable Legacy Code Lens is disabled, but Pester $($pesterModule.Version) is loaded. Some of the code lense features might not work as expected."
83
+
}
84
+
85
+
86
+
if ($All) {
87
+
if ($pesterModule.Version-ge'5.0.0') {
88
+
$configuration=@{
89
+
Run=@{
90
+
Path=$ScriptPath
91
+
}
92
+
}
93
+
# only override this if user asks us to do it, to allow Pester to pick up
94
+
# $PesterPreference from caller context and merge it with the configuration
95
+
# we provide below, this way user can specify his output (and other) settings
96
+
# using the standard [PesterConfiguration] object, and we can avoid providing
Copy file name to clipboardExpand all lines: package.json
+15
Original file line number
Diff line number
Diff line change
@@ -760,6 +760,21 @@
760
760
"type": "array",
761
761
"default": null,
762
762
"description": "An array of strings that enable experimental features in the PowerShell extension."
763
+
},
764
+
"powershell.pester.enableLegacyCodeLens": {
765
+
"type": "boolean",
766
+
"default": true,
767
+
"description": "Enable code lense that is compatible with Pester 4. Disabling this will show 'Run Tests' on all It, Describe and Context blocks, and will correctly work only with Pester 5 and newer."
768
+
},
769
+
"powershell.pester.outputVerbosity": {
770
+
"type": "string",
771
+
"enum": [
772
+
"FromPreference",
773
+
"Normal",
774
+
"Minimal"
775
+
],
776
+
"default": "FromPreference",
777
+
"description": "Defines the verbosity of output to be used. For Pester 5 and newer the default value FromPreference, will use the Output settings from the $PesterPreference defined in the caller context, and will default to Normal if there is none. For Pester 4 the FromPreference and Normal options map to All, and Minimal option maps to Fails."
// We follow the same convention as VS Code - https://github.com/microsoft/vscode/blob/ff00badd955d6cfcb8eab5f25f3edc86b762f49f/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts#L105-L107
0 commit comments