Context
Install-PSResourceWithRetry now guarantees that the version selected via Version/Prerelease is the only version of the module loaded in the session: it removes already-loaded instances (Get-Module -Name <Name> -All | Remove-Module) and imports the resolved version with -RequiredVersion -Force -Global.
The existing version-constraint tests assert the resolved version, but nothing asserts that side-by-side loaded versions are actually eliminated (the new behavior this change adds).
Request
Add an integration test that:
- Pre-imports a module version different from the one the helper will select (e.g.
Import-Module <Module> -RequiredVersion <old> before invoking).
- Runs the helper with a pin to a different version.
- Asserts that
Get-Module -Name <Module> -All returns exactly one loaded instance and that its version equals the selected version.
Acceptance criteria
- The test fails against the pre-change behavior (side-by-side versions left loaded) and passes with the fix.
- Runs in the existing Action-Test workflow matrix.
Raised from Copilot review feedback on #74.
Context
Install-PSResourceWithRetrynow guarantees that the version selected viaVersion/Prereleaseis the only version of the module loaded in the session: it removes already-loaded instances (Get-Module -Name <Name> -All | Remove-Module) and imports the resolved version with-RequiredVersion -Force -Global.The existing version-constraint tests assert the resolved version, but nothing asserts that side-by-side loaded versions are actually eliminated (the new behavior this change adds).
Request
Add an integration test that:
Import-Module <Module> -RequiredVersion <old>before invoking).Get-Module -Name <Module> -Allreturns exactly one loaded instance and that its version equals the selected version.Acceptance criteria
Raised from Copilot review feedback on #74.