Skip to content

Commit 31be15e

Browse files
Drop the GUID from the Pester requirement example
1 parent 318b4cc commit 31be15e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/docs/PowerShell/Modules/Test-Specification.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ This document defines the structure and guidelines for writing Pester tests for
99
Lock the test framework to a **major version** so a new Pester major cannot be adopted silently and break every suite at once. Declare it as the first line of each `*.Tests.ps1` file:
1010

1111
```powershell
12-
#Requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '6.0.0'; MaximumVersion = '6.*'; GUID = 'a699dea5-2c73-4616-a270-1f7abb777e71' }
12+
#Requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '6.0.0'; MaximumVersion = '6.*' }
1313
```
1414

1515
- `ModuleVersion` + `MaximumVersion` accept any Pester `6.x`, so routine minor and patch updates flow in without a change here — only a new major requires a deliberate, reviewed bump.
16-
- The `GUID` pins module identity (a name alone can be squatted). PowerShell enforces both the version range and the GUID at discovery time.
16+
- The `MaximumVersion = '6.*'` wildcard locks to the major without a sentinel version; PowerShell enforces the range at discovery time.
1717
- The [Invoke-Pester](https://github.com/PSModule/Invoke-Pester) action installs a matching `6.x`, so the requirement and the installed version stay aligned.
18+
- Pinning module identity with a `GUID` is a separate, stricter supply-chain control — omit it for the default major-lock; add it only when identity assurance is required.
1819

1920
## Test Structure
2021

0 commit comments

Comments
 (0)