⚙️ [Maintenance]: Require Pester 6.x in test files#18
⚙️ [Maintenance]: Require Pester 6.x in test files#18Marius Storhaug (MariusStorhaug) wants to merge 2 commits into
Conversation
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
There was a problem hiding this comment.
Pull request overview
This PR adds a PowerShell #Requires -Modules directive to the module’s Pester test file to enforce running the tests with Pester 6.x, aligning test discovery/runtime dependencies with the stated ecosystem direction.
Changes:
- Added
#Requires -Modulesintests/PSModuleTest.Tests.ps1to declare Pester as a required module at test discovery time. - Introduced a version constraint intended to lock tests to the Pester 6 major series.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,4 +1,6 @@ | |||
| Describe 'Module' { | |||
| #Requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '6.0.0'; MaximumVersion = '6.*'; GUID = 'a699dea5-2c73-4616-a270-1f7abb777e71' } | |||
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
The GUID pins module identity (precise pinning), a stricter control than the lock-to-major risk appetite. Keep only the version range.
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Adds a Pester 6.x major-version lock to this module's test file(s), matching the rest of the ecosystem. These tests previously declared no Pester requirement.
#Requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '6.0.0'; MaximumVersion = '6.*'; GUID = 'a699dea5-2c73-4616-a270-1f7abb777e71' }ModuleVersion+MaximumVersion = '6.*'accept any Pester6.x(the6.*wildcard locks to the major without a sentinel version); theGUIDpins module identity. Both are enforced by PowerShell at discovery time.The install side is locked to the same major in PSModule/Invoke-Pester#70. Part of the dependency-management epic PSModule/Process-PSModule#356.