Skip to content

New Instructions: PowerShell Pester v5 Testing Guidelines#122

Merged
codemillmatt merged 4 commits into
github:mainfrom
PlagueHO:add-powershell-pester-test-v5-instructions
Jul 25, 2025
Merged

New Instructions: PowerShell Pester v5 Testing Guidelines#122
codemillmatt merged 4 commits into
github:mainfrom
PlagueHO:add-powershell-pester-test-v5-instructions

Conversation

@PlagueHO

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • My contribution adds a new instruction, prompt, or chat mode file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, or chat mode with GitHub Copilot.
  • I have run node update-readme.js and verified that README.md is up to date.

Description

  • Adds a new Copilot Instructions for PowerShell Pester v5 tests (***.tests.ps1)
  • Covers file naming, test structure, core keywords, setup/teardown, assertions, mocking, and best practices.
  • Provides examples and configuration details for effective test execution.

Type of Contribution

  • New instruction file.
  • New prompt file.
  • New chat mode file.
  • Other (please specify):

Additional Notes

It references the existing #powershell.instructions.md (as per docs: https://code.visualstudio.com/docs/copilot/copilot-customization#_custom-instructions), so works best if this is installed.


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Copilot AI review requested due to automatic review settings July 23, 2025 23:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive PowerShell Pester v5 testing guidelines to provide GitHub Copilot with detailed instructions for generating PowerShell test files. The instructions cover test structure, assertions, mocking, data-driven testing, and best practices specific to Pester v5.

Key changes:

  • Adds new instruction file for PowerShell Pester v5 testing conventions
  • Updates README.md to include the new instruction in the table
  • Provides detailed guidance on test structure, mocking, assertions, and configuration

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
instructions/powershell-pester-5.instructions.md New comprehensive Pester v5 testing guidelines with examples and best practices
README.md Added table entry for the new PowerShell Pester v5 instruction file

Comment thread instructions/powershell-pester-5.instructions.md Outdated
PlagueHO added 3 commits July 24, 2025 17:49
- 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.
- Removed the empty PowerShell code block from the PowerShell Pester v5 testing guidelines.
- Updated the file naming pattern from '**/*.tests.ps1' to '**/*.Tests.ps1' for consistency with PowerShell Pester v5 conventions.
@PlagueHO PlagueHO force-pushed the add-powershell-pester-test-v5-instructions branch from 3aab74f to 4cb8493 Compare July 25, 2025 00:49
@codemillmatt codemillmatt merged commit 82d6efe into github:main Jul 25, 2025
2 checks passed
@PlagueHO PlagueHO deleted the add-powershell-pester-test-v5-instructions branch July 25, 2025 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants