-
-
Notifications
You must be signed in to change notification settings - Fork 472
Contributing to Pester
Adam Bertram edited this page Nov 11, 2016
·
19 revisions
There may be times when Pester does not meet all of your needs either in the form of new features or bug fixes. In these cases, Pester has two ways that you can communicate these needs to use through either creating an Issue or submitting a pull request.
In order to propose a new function to be added to Pester, we ask that you:
- Create a PS1 script with $FunctionName in the Functions directory.
- Add your function to the FunctionsToExport key in the Pester module manifest.
- Add the function to SafeCommands in the Pester module
& $script:SafeCommands['Export-ModuleMember'] New-Function
- Create a Pester test file in the form of $FunctionName.Tests.ps1 in the Functions directory.
- Do not dot source the function script in your tests. The function will already be included as part of the module.
- Run the Pester test suite by running Invoke-Pester with no parameters and correct all problems.
Get-Module Pester | Remove-Module
Import-Module .\Pester.psd1
Invoke-Pester -Path (Get-Module Pester).ModuleBase
- Ensure your code works on PowerShell versions 2-5.