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:
@@ -49,7 +49,7 @@ Describe "Remote module tests" -Tags 'Feature','RequireAdminOnWindows' {
|
||||
}
|
||||
$modules = Get-Module @parameters
|
||||
$modules | Should -Not -BeNullOrEmpty
|
||||
$modules[0] | Should -BeOfType "System.Management.Automation.PSModuleInfo"
|
||||
$modules[0] | Should -BeOfType System.Management.Automation.PSModuleInfo
|
||||
}
|
||||
|
||||
It "Get-Module can be called as an API with '<parameter>' = '<value>'" -TestCases @(
|
||||
@@ -74,7 +74,7 @@ Describe "Remote module tests" -Tags 'Feature','RequireAdminOnWindows' {
|
||||
$getModuleCommand = [Microsoft.PowerShell.Commands.GetModuleCommand]::new()
|
||||
$getModuleCommand.$parameter = $value
|
||||
if ($parameter -eq "FullyQualifiedName") {
|
||||
$getModuleCommand.FullyQualifiedName | Should -BeOfType "Microsoft.PowerShell.Commands.ModuleSpecification"
|
||||
$getModuleCommand.FullyQualifiedName | Should -BeOfType Microsoft.PowerShell.Commands.ModuleSpecification
|
||||
$getModuleCommand.FullyQualifiedName.Name | Should -BeExactly "foo"
|
||||
$getModuleCommand.FullyQualifiedName.Version | Should -Be "1.2.3"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user