Skip to content

Commit

Permalink
🧪 Fix versioning test
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinGrote committed Dec 7, 2024
1 parent d2e0185 commit ba7134d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions ModuleFast.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,7 @@ function Install-ModuleFastHelper {

$installPath = $newInstallPath
$context.InstallPath = $installPath
$context.Module.ModuleVersion = [string]$moduleManifestVersion #Some System.Version don't cast right
$originalModuleVersion > (Join-Path $installPath '.originalModuleVersion')
$installIndicatorPath = Join-Path $installPath '.incomplete'
} else {
Expand Down
11 changes: 9 additions & 2 deletions ModuleFast.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Describe 'Get-ModuleFastPlan' -Tag 'E2E' {
Spec = 'ImportExcel<2'
ModuleName = 'ImportExcel'
Check = {
$actual.ModuleVersion | Should -Be '1.99'
$actual.ModuleVersion | Should -Be '1.99.0' #Nuget changes this to 1.99
}
},
@{
Expand All @@ -284,6 +284,13 @@ Describe 'Get-ModuleFastPlan' -Tag 'E2E' {
Check = {
$actual.ModuleVersion | Should -Be '2.2.0'
}
},
@{
Spec = 'ConnectWiseManageAPI=0.4.15.0'
ModuleName = 'ConnectWiseManageAPI'
Check = {
$actual.ModuleVersion | Should -Be '0.4.15' #Install module version is 0.4.15.0 but nuget truncates this
}
}
)

Expand Down Expand Up @@ -377,7 +384,7 @@ Describe 'Get-ModuleFastPlan' -Tag 'E2E' {
}
It 'Gets multiple modules' {
Get-ModuleFastPlan @{ModuleName = 'Az'; RequiredVersion = '11.1.0' }, @{ModuleName = 'VMWare.PowerCli'; RequiredVersion = '13.2.0.22746353' }
| Should -HaveCount 168
| Should -HaveCount 170
}

It 'Casts to ModuleSpecification' {
Expand Down

0 comments on commit ba7134d

Please sign in to comment.