Commit 25dd9dc
Remove pinned Pester RequiredVersion causing test discovery failure (#16)
CI `Test-*` jobs failed during Pester discovery with `FileLoadException:
Could not load file or assembly 'Pester, Version=5.7.1.0'... Assembly
with same name is already loaded`. The test file pinned an exact Pester
version via `#Requires`, which conflicted with Pester 5.8.0 already
loaded by the `PSModule/Invoke-Pester` action before discovery runs.
## Changes
- Removed the `#Requires -Modules @{ ModuleName = 'Pester';
RequiredVersion = '5.7.1' }` line from `tests/PSCustomObject.Tests.ps1`.
- Confirmed no other test files in the repo carry a similar
exact-version Pester pin.
```diff
-#Requires -Modules @{ ModuleName = 'Pester'; RequiredVersion = '5.7.1' }
-
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
```
The `Invoke-Pester` action controls the Pester version centrally, so
per-repo version pinning is redundant and causes this drift whenever
Pester releases a new version. This aligns the test file with
`PSModule/Template-PSModule` and other module repos, which carry no
Pester `#Requires` pin.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Marius Storhaug <marstor@hotmail.com>1 parent 34226ee commit 25dd9dc
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
4 | 2 | | |
5 | 3 | | |
6 | 4 | | |
| |||
0 commit comments