$Script:ModuleName = 'LDTestFramework' $Script:ModuleRoot = Split-Path -Path $PSScriptRoot -Parent Describe "Public commands have comment-based or external help" -Tags 'Build' { $functions = Get-Command -Module $ModuleName $help = foreach ($function in $functions) { Get-Help -Name $function.Name } foreach ($node in $help) { Context $node.Name { It "Should have a Description or Synopsis" -Pending { ($node.Description + $node.Synopsis) | Should Not BeNullOrEmpty } It "Should have an Example" -Pending { $node.Examples | Should Not BeNullOrEmpty } foreach ($parameter in $node.Parameters.Parameter) { if ($parameter -notmatch 'WhatIf|Confirm') { It "Should have a Description for Parameter [$($parameter.Name)]" -Pending { $parameter.Description.Text | Should Not BeNullOrEmpty } } } } } }