pester

Installation
SKILL.md

Pester Unit Testing for PowerShell

Pester is PowerShell's ubiquitous test and mock framework. Pester 5+ uses a two-phase execution model (Discovery → Run) that requires specific patterns for reliable tests.

TDD Cycle

  1. Red – Write a failing test describing expected behavior
  2. Green – Implement minimal code to pass
  3. Refactor – Clean up while keeping tests green

Test File Structure

Test files use *.Tests.ps1 naming convention. Place alongside source files:

src/
├── Get-Widget.ps1
└── Get-Widget.Tests.ps1
Related skills
Installs
19
GitHub Stars
16
First Seen
Feb 6, 2026