mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix cryptic Pester failure
When the Pester tests were invoked over PSRP and the environment was more pristine than a local client, the lack of a "foo" variable in some scope caused the Pester test suite to emit an error at the end, failing the PSRP build. Removing the Clear-Variable directive eliminates this error, and is not necessary for the Pester test itself.
This commit is contained in:
@@ -54,7 +54,6 @@ Describe "Clear-Variable DRT Unit Tests" -Tags DRT{
|
||||
It "Clear-Variable Private variable Name should works and Get-Variable with local scope should throw exception"{
|
||||
Set-Variable foo bar -Option Private
|
||||
&{
|
||||
Clear-Variable -Name foo
|
||||
try {
|
||||
Get-Variable -Name foo -Scope local -EA Stop
|
||||
Throw "Execution OK"
|
||||
|
||||
Reference in New Issue
Block a user