Skip to content

Commit 79fd49b

Browse files
Fix path resolution for public functions and add test for public function files
1 parent 274654f commit 79fd49b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/Integration/Module.Integration.Tests.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Describe 'PSScriptModule Integration Tests' -Tag 'Integration' {
5151
$exportedCommands = $module.ExportedCommands.Keys
5252

5353
# Discover public functions from source
54-
$publicFunctionsPath = Resolve-Path -Path (Join-Path -Path $PSScriptRoot -ChildPath '../../src/Public')
54+
$publicFunctionsPath = Resolve-Path -Path (Join-Path -Path $PSScriptRoot -ChildPath '../../src/Public/')
5555
$publicFunctionFiles = Get-ChildItem -Path $publicFunctionsPath -Include '*.ps1' -Exclude '*.Tests.ps1' -Recurse |
5656
Select-Object -ExpandProperty BaseName
5757
}
@@ -60,6 +60,10 @@ Describe 'PSScriptModule Integration Tests' -Tag 'Integration' {
6060
$exportedCommands.Count | Should -BeGreaterThan 0
6161
}
6262

63+
It 'Public function files' {
64+
$publicFunctionFiles | Should -Be 1
65+
}
66+
6367
It 'Should discover public functions from src/Public' {
6468
$publicFunctionFiles.Count | Should -BeGreaterThan 0 -Because 'src/Public should contain at least one public function'
6569
}

0 commit comments

Comments
 (0)