Skip to content

Commit cd87b63

Browse files
Cover real-version module install path
1 parent 0cd150a commit cd87b63

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/tests/Module/PSModule/PSModule.Tests.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ Describe 'PSModule - Module tests' {
8282
$result | Should -Be $true
8383
Write-Host "$($result | Format-List | Out-String)"
8484
}
85+
It 'Module version folder matches the manifest version' {
86+
$manifest = Import-PowerShellDataFile -Path $moduleManifestPath
87+
$moduleVersionFolder = Split-Path -Path (Split-Path -Path $moduleManifestPath -Parent) -Leaf
88+
89+
$moduleVersionFolder | Should -Be $manifest.ModuleVersion.ToString()
90+
}
8591
It 'Module Manifest is valid' {
8692
$result = Test-ModuleManifest -Path $moduleManifestPath
8793
$result | Should -Not -Be $null

tests/outputTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@{
22
RootModule = 'PSModuleTest.psm1'
3-
ModuleVersion = '999.0.0'
3+
ModuleVersion = '3.0.11'
44
CompatiblePSEditions = @(
55
'Core'
66
'Desktop'

0 commit comments

Comments
 (0)