Ensure HelpInfo.Category is consistently a string (#18254)

This commit is contained in:
Steve Lee authored and GitHub committed 2022-11-15 17:57:03 -08:00
1 parent 65b353d9cf
commit 4f19c05547
3 files changed
+12 -2

No files matched your search

@@ -45,6 +45,16 @@ function GetCurrentUserHelpRoot {
return $userHelpRoot
}
Describe 'Validate HelpInfo type' -Tags @('CI') {
It 'Category should be a string' {
$help = Get-Help *
$category = $help | ForEach-Object { $_.Category.GetType().FullName } | Select-Object -Unique
$category.Count | Should -Be 1 -Because 'All help categories should be strings, >1 indicates a type mismatch'
$category | Should -BeExactly 'System.String'
}
}
Describe "Validate that <pshome>/<culture>/default.help.txt is present" -Tags @('CI') {
It "Get-Help returns information about the help system" {