Skip to content

Commit 2cecf24

Browse files
Refactor public function file discovery and update validation check in integration tests
1 parent 79fd49b commit 2cecf24

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/Integration/Module.Integration.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ Describe 'PSScriptModule Integration Tests' -Tag 'Integration' {
5252

5353
# Discover public functions from source
5454
$publicFunctionsPath = Resolve-Path -Path (Join-Path -Path $PSScriptRoot -ChildPath '../../src/Public/')
55-
$publicFunctionFiles = Get-ChildItem -Path $publicFunctionsPath -Include '*.ps1' -Exclude '*.Tests.ps1' -Recurse |
56-
Select-Object -ExpandProperty BaseName
55+
$publicFunctionFiles = @(Get-ChildItem -Path $publicFunctionsPath -Include '*.ps1' -Exclude '*.Tests.ps1' -Recurse |
56+
Select-Object -ExpandProperty BaseName)
5757
}
5858

5959
It 'Should export at least one function' {
6060
$exportedCommands.Count | Should -BeGreaterThan 0
6161
}
6262

6363
It 'Public function files' {
64-
$publicFunctionFiles | Should -Be 1
64+
$publicFunctionFiles | Should -HaveCount 1 -Because 'The template ships with a single public function'
6565
}
6666

6767
It 'Should discover public functions from src/Public' {

0 commit comments

Comments
 (0)