Commit Graph

2 Commits

Author SHA1 Message Date
Trent Blackburn 70209f3dfd Clarify that Set-ItResult ends the It block in Pester v5 Skip section (#1857)
Set-ItResult -Skipped/-Inconclusive throws internally to end the It block, so code after it does not run and a trailing return is unreachable. Documenting this prevents the recurring suggestion to add a redundant return after Set-ItResult.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 15:05:02 +10:00
Daniel Scott-Raynsford 82d6efe37c New Instructions: PowerShell Pester v5 Testing Guidelines (#122)
* CHANGE: Add PowerShell Pester v5 Testing Guidelines

- Introduced a new guide for PowerShell Pester testing best practices.
- Covers file naming, test structure, core keywords, setup/teardown, assertions, mocking, and best practices.
- Provides examples and configuration details for effective test execution.

* CHANGE: Remove unnecessary code block from guidelines

- Removed the empty PowerShell code block from the PowerShell Pester v5 testing guidelines.

* CHANGE: Correct file naming pattern in guidelines

- Updated the file naming pattern from '**/*.tests.ps1' to '**/*.Tests.ps1' for consistency with PowerShell Pester v5 conventions.

---------

Co-authored-by: Matt Soucoup <masoucou@microsoft.com>
2025-07-24 19:48:27 -07:00