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:
@@ -290,7 +290,7 @@ Describe "Exception from initializer" -Tags "CI" {
|
||||
|
||||
It "static member w/ ctor" {
|
||||
$e = { $null = [MSFT_6397334c]::a } | Should -Throw -PassThru
|
||||
$e.Exception | Should -BeOfType 'System.TypeInitializationException'
|
||||
$e.Exception | Should -BeOfType System.TypeInitializationException
|
||||
$e.Exception.InnerException.ErrorRecord.FullyQualifiedErrorId | Should -BeExactly 'InvalidCastFromStringToInteger'
|
||||
$e.Exception.InnerException.InnerException.ErrorRecord.InvocationInfo.Line | Should -Match 'a = "zz"'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user