Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Oct 22, 2024
1 parent 0365458 commit a403f5f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/unit/tasks/Generate_Markdown_For_DSC_Resources.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,22 @@ Describe 'Generate_Markdown_For_DSC_Resources' {

Assert-MockCalled -CommandName New-DscResourceWikiPage -Exactly -Times 1 -Scope It
}

It 'Should run the build task with new configuration key without throwing' {
{
$taskParameters = @{
ProjectName = 'DscResource.DocGenerator'
SourcePath = $TestDrive
BuildInfo = @{
'DscResource.DocGenerator' = @{
Generate_Markdown_For_DSC_Resources = @{}
}
}
}

Invoke-Build -Task $buildTaskName -File $script:buildScript.Definition @taskParameters
} | Should -Not -Throw

Assert-MockCalled -CommandName New-DscResourceWikiPage -Exactly -Times 1 -Scope It
}
}

0 comments on commit a403f5f

Please sign in to comment.