From 51068d96701f824089b279dbbab8049fd3b75ace Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 28 Aug 2024 15:33:44 -0500 Subject: [PATCH] Update configs.Tests.ps1 --- pester/configs.Tests.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pester/configs.Tests.ps1 b/pester/configs.Tests.ps1 index dd2db7f3..f8e55c44 100644 --- a/pester/configs.Tests.ps1 +++ b/pester/configs.Tests.ps1 @@ -37,6 +37,12 @@ Describe "Config Files" -ForEach @( $result = New-Object System.Collections.Generic.List[System.Object] Foreach ($application in $applications) { $compare = $global:importedconfigs.$name.$application | Get-Member -MemberType NoteProperty | Select-Object -ExpandProperty name + if (-not $compare) { + throw "Comparison object for application '$application' is null." + } + if (-not $template) { + throw "Template object for application '$application' is null." + } if ($(Compare-Object $compare $template) -ne $null) { $result.Add($application) }