1- Describe " Validating the module manifest" {
1+ Describe " Validating the module manifest" {
22 $moduleRoot = (Resolve-Path " $PSScriptRoot \..\.." ).Path
33 $manifest = ((Get-Content " $moduleRoot \PSModuleDevelopment.psd1" ) -join " `n " ) | Invoke-Expression
44 [version ]$moduleVersion = Get-Item " $moduleRoot \PSModuleDevelopment.psm1" | Select-String - Pattern ' \$script:PSModuleVersion = "(.*?)"' | ForEach-Object { $_.Matches [0 ].Groups[1 ].Value }
88 $count = (Compare-Object - ReferenceObject $files.BaseName - DifferenceObject $manifest.FunctionsToExport ).Count
99 $count | Should be 0
1010 }
11-
11+
1212 It " Exports none of its internal functions" {
1313 $files = Get-ChildItem " $moduleRoot \internal\functions" - Recurse - File - Filter " *.ps1"
1414 $files | Where-Object BaseName -In $manifest.FunctionsToExport | Should Be $null
1515 }
16-
16+
1717 It " Has the same version as the psm1 file" {
1818 ([version ]$manifest.ModuleVersion ) | Should Be $moduleVersion
1919 }
2020 }
21-
21+
2222 Context " Individual file validation" {
2323 It " The root module file exists" {
2424 Test-Path " $moduleRoot \$ ( $manifest.RootModule ) " | Should Be $true
2525 }
26-
26+
2727 foreach ($format in $manifest.FormatsToProcess )
2828 {
2929 It " The file $format should exist" {
3030 Test-Path " $moduleRoot \$format " | Should Be $true
3131 }
3232 }
33-
33+
3434 foreach ($type in $manifest.TypesToProcess )
3535 {
3636 It " The file $type should exist" {
3737 Test-Path " $moduleRoot \$type " | Should Be $true
3838 }
3939 }
40-
40+
4141 foreach ($assembly in $manifest.RequiredAssemblies )
4242 {
4343 It " The file $assembly should exist" {
4444 Test-Path " $moduleRoot \$assembly " | Should Be $true
4545 }
4646 }
47+
48+ foreach ($tag in $manifest.PrivateData.PSData.Tags ) {
49+ It " Tags should have no spaces in name" {
50+ $tag -match " " | Should - Be $false
51+ }
52+ }
4753 }
48- }
54+ }
0 commit comments