PowerShell BDD and TDD testing framework. Includes tools for function testing, module testing, mocking, code coverage and more.
Joined September 2014
- The Pester docs have a follow-along tutorial now, written by @FrodeFlaten. Empty folder to a tested PowerShell module running in CI, in order. There is no sample project to download, you type every line yourself. pester.dev/tutorial
- Should-* was a closed set. Not anymore. Pester 6.1.0 lets you write your own assertion with New-ShouldAssertion, and it gets everything a built-in one has: pipeline input, value formatting, the hints, soft assertions. github.com/pester/Pester/โฆ #pspester #powershell
- Pester 6: every Should-* takes the value from the pipeline, or explicitly with -Actual. Should-Be -Actual 5 -Expected 5. Handy when there is nothing to pipe. #pspester #powershell
- Pester reads each test file twice: a discovery pass to find the tests, then a run pass. Code directly inside a Describe runs during discovery, so build your -ForEach cases in BeforeDiscovery, not BeforeAll. #pspester #powershell

