mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Unify pester test syntax for the arguments of -BeOfType (#11558)
This commit is contained in:
@@ -91,8 +91,8 @@ try {
|
||||
# in a runspace that has not been opened.
|
||||
$err = { $ps.AddScript('1+1').InvokeAsync() } | Should -Throw -ErrorId "InvalidRunspaceStateException" -PassThru
|
||||
|
||||
$err.Exception | Should -BeOfType "System.Management.Automation.MethodInvocationException"
|
||||
$err.Exception.InnerException | Should -BeOfType "System.Management.Automation.Runspaces.InvalidRunspaceStateException"
|
||||
$err.Exception | Should -BeOfType System.Management.Automation.MethodInvocationException
|
||||
$err.Exception.InnerException | Should -BeOfType System.Management.Automation.Runspaces.InvalidRunspaceStateException
|
||||
$err.Exception.InnerException.CurrentState | Should -Be 'BeforeOpen'
|
||||
$err.Exception.InnerException.ExpectedState | Should -Be 'Opened'
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user