Browsed by
Tag: Pester

Git Commit Messages and Hooks

Git Commit Messages and Hooks

Maintaining integrity in your code is hard. Git hooks are an easy way to manage your workflow so you never commit code that doesn’t meet your standards. How do you know if the changes you made introduced bugs? Testing of course. Do you know if your code follows best practices? To figure that out, you’d use a linter. In PowerShell the community uses Pester for testing and PSScriptAnalyzer for making sure you follow community standards. Git hooks let you validate…

Read More Read More

Generic Pester Tests

Generic Pester Tests

Writing good Pester Tests is hard. Use your PowerShell knowledge to make things easier with Generic Pester Tests. Module Testing There are many requirements for module manifest to work everywhere. You need a root module to load your .PSM1, you need a version number so PowerShell knows which version to load into the console at runtime, and there should also be identifying information for more information. If you plan on publishing to the PowerShell Gallery you also need to include…

Read More Read More