Skip to content

Commit

Permalink
Small fix in test (added conditional)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSehr committed Oct 23, 2024
1 parent ea1f1ea commit 1376257
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ Describe 'Module tests' -Tag 'Module' {
$incorrectParameters | Should -BeNullOrEmpty -Because ('only required parameters in the template file should have a description that starts with "Required.". Found incorrect items: [{0}].' -f ($incorrectParameters -join ', '))
}

It '[<moduleFolderName>] All required parameters & UDTs in template file should have description that start with "Required.".' -TestCases $moduleFolderTestCases {
It '[<moduleFolderName>] All required parameters & UDTs in template file should have description that start with "(Required|Conditional).".' -TestCases $moduleFolderTestCases {
param (
[hashtable] $templateFileContent,
[hashtable] $templateFileParameters
Expand All @@ -650,7 +650,7 @@ Describe 'Module tests' -Tag 'Module' {

if ($isRequired) {
$description = $templateFileParameters.$parameter.metadata.description
if ($description -notmatch '^Required\.') {
if ($description -notmatch '^(Required|Conditional)\.') {
$incorrectParameters += $parameter
}
}
Expand Down

0 comments on commit 1376257

Please sign in to comment.