Skip to content

Commit 6d9a6a6

Browse files
committed
Update LMFilterValidation.Tests.ps1
1 parent 96dcb86 commit 6d9a6a6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Tests/LMFilterValidation.Tests.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,14 @@ Describe 'Filter Validation Config Generator' {
243243
It 'Should have arrays of field names for each endpoint' {
244244
$Config = Import-PowerShellDataFile "$PSScriptRoot/../Private/LMFilterValidationConfig.psd1"
245245
foreach ($endpoint in $Config.Keys) {
246-
$Config[$endpoint] | Should -BeOfType [array]
247-
$Config[$endpoint].Count | Should -BeGreaterThan 0
246+
# PowerShell data files with single items may be strings, so ensure it's an array
247+
$fields = @($Config[$endpoint])
248+
$fields | Should -Not -BeNullOrEmpty
249+
$fields.Count | Should -BeGreaterThan 0
248250
}
249251
}
250252
}
251253
}
252254

253255

256+

0 commit comments

Comments
 (0)