⚙️ [Maintenance]: Require Pester 6.x in test files#45
⚙️ [Maintenance]: Require Pester 6.x in test files#45Marius 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 updates the module’s Pester test script to declare an explicit dependency on Pester 6.x at discovery time, aligning test execution with the intended major-version constraint.
Changes:
- Added a
#Requires -Modulesdirective totests/PSSemVer.Tests.ps1to enforce the presence of the Pester module and constrain its version.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,4 +1,6 @@ | |||
| Describe 'PSSemVer' { | |||
| #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.