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:
@@ -45,7 +45,7 @@ Describe "Command Discovery tests" -Tags "CI" {
|
||||
|
||||
$commands.Count | Should -Be 1
|
||||
$aliasResult = $commands -as [System.Management.Automation.AliasInfo]
|
||||
$aliasResult | Should -BeOfType [System.Management.Automation.AliasInfo]
|
||||
$aliasResult | Should -BeOfType System.Management.Automation.AliasInfo
|
||||
$aliasResult.Name | Should -Be 'AliasCommandDiscoveryTest'
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ Describe "Telemetry for shell startup" -Tag CI {
|
||||
$uuidPath | Should -Exist
|
||||
(Get-ChildItem -Path $uuidPath).Length | Should -Be 16
|
||||
[byte[]]$newBytes = Get-Content -AsByteStream -Path $uuidPath
|
||||
[System.Guid]::New($newBytes) | Should -BeOfType [System.Guid]
|
||||
[System.Guid]::New($newBytes) | Should -BeOfType System.Guid
|
||||
}
|
||||
|
||||
It "Should not create a telemetry file if one already exists and telemetry is opted in" {
|
||||
@@ -96,7 +96,7 @@ Describe "Telemetry for shell startup" -Tag CI {
|
||||
[System.IO.File]::WriteAllBytes($uuidPath, $badBytes)
|
||||
& $PWSH -NoProfile -Command "exit"
|
||||
[byte[]]$nb = Get-Content -AsByteStream -Path $uuidPath
|
||||
[System.Guid]::New($nb) | Should -BeOfType [System.Guid]
|
||||
[System.Guid]::New($nb) | Should -BeOfType System.Guid
|
||||
}
|
||||
|
||||
It "Should not create a new telemetry file if the current one has a valid guid and is larger than 16 bytes" {
|
||||
|
||||
Reference in New Issue
Block a user