Skip to content

Commit 4fcd7c8

Browse files
⚙️ [Maintenance]: Require Pester 6.x in test files (#16)
Pester tests in this module now require the Pester **6.x** major version, so every contributor and CI run resolves the same major and a new Pester major can't slip in and break the suite. The tests previously declared no framework requirement and ran on whatever Pester happened to be installed. ## Changed: tests are locked to the Pester 6.x major Every `*.Tests.ps1` file now starts with a version-bounded requirement: ```powershell #Requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '6.0.0'; MaximumVersion = '6.*' } ``` Any Pester `6.x` satisfies it, so minor and patch releases flow in automatically while moving to a new major stays a deliberate, reviewed change. No module source or behaviour changes. ## Technical Details - Prepends a `#Requires -Modules` statement to each test file under `tests/`; non-test files are untouched. - `ModuleVersion = '6.0.0'` is the floor and `MaximumVersion = '6.*'` the wildcard major ceiling. Module-identity (`GUID`) pinning is intentionally omitted — it is a separate supply-chain control, not part of the lock-to-major risk appetite. - The install side is locked to the same major in PSModule/Invoke-Pester#70. Part of the dependency-management epic PSModule/Process-PSModule#356.
1 parent c014177 commit 4fcd7c8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/PSModuleTest.Tests.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Describe 'Module' {
1+
#Requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '6.0.0'; MaximumVersion = '6.*' }
2+
3+
Describe 'Module' {
24
It 'Function: Get-PSModuleTest' {
35
Get-PSModuleTest -Name 'World' | Should -Be 'Hello, World!'
46
}

0 commit comments

Comments
 (0)