Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tests/Help.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,16 @@ BeforeAll {
Describe "Test help for <_.Name>" -ForEach $commands {

BeforeDiscovery {
# Get command help, parameters, and links
# Get command help, parameters, and links. These are duplicated in BeforeAll
# below; they must also exist here because the nested Context blocks use them in
# -ForEach, which Pester evaluates during discovery (before BeforeAll runs).
$command = $_
$commandName = $command.Name
$commandHelp = Get-Help -Name $command.Name -ErrorAction 'SilentlyContinue'
$commandParameters = global:FilterOutCommonParameters -Parameters $command.ParameterSets.Parameters
$commandParameterNames = $commandParameters.Name
$helpParameters = global:FilterOutCommonParameters -Parameters $commandHelp.Parameters.Parameter
$helpParameterNames = $helpParameters.Name
$helpLinks = $commandHelp.relatedLinks.navigationLink.uri | Where-Object { $_ -match '^https?://' }
Comment thread
tablackburn marked this conversation as resolved.
}

Expand Down
Loading