Skip to content

Add Example Parameter Description Text#16

Merged
devblackops merged 6 commits into
devblackops:masterfrom
mikejwhat:master
Feb 27, 2021
Merged

Add Example Parameter Description Text#16
devblackops merged 6 commits into
devblackops:masterfrom
mikejwhat:master

Conversation

@mikejwhat

@mikejwhat mikejwhat commented Nov 15, 2020

Copy link
Copy Markdown
Contributor

Took me a long time to figure out how to get Help.tests.ps1 to pass after adding a parameter to a public function. Thought I'd try to save others the same hassle.

Description

Added example parameter description to the example function to demonstrate where this needs to go in order to show up in compiled MAML help (and pass associated Pester test).

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
I've been tearing my hair out trying to figure out how to get Help.tests.ps1 to pass when a function has a parameter (specifically the below test)

# Should be a description for every parameter
                It "gets help for parameter: $parameterName : in $commandName" {
                    $parameterHelp.Description.Text | Should Not BeNullOrEmpty
                }
@devblackops

Copy link
Copy Markdown
Owner

Thanks!

@devblackops devblackops merged commit 3a014c0 into devblackops:master Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants