Unify pester test syntax for the arguments of -BeOfType (#11558)

This commit is contained in:
xtqqczze
2020-01-24 11:00:37 -08:00
committed by Dongbo Wang
parent a7a2b12336
commit 920b671fb4
68 changed files with 216 additions and 216 deletions
@@ -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" {