mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Update pester syntax in Set-Location test (#7615)
This commit is contained in:
@@ -175,7 +175,7 @@ Describe "Set-Location" -Tags "CI" {
|
||||
Set-Location ..
|
||||
$ExecutionContext.InvokeCommand.LocationChangedAction = { throw "Boom" }
|
||||
# Verify that the exception occurred
|
||||
{ Set-Location $location } | Should Throw "Boom"
|
||||
{ Set-Location $location } | Should -Throw "Boom"
|
||||
# But the location should still have changed
|
||||
$PWD.Path | Should -Be $location.Path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user