From 01f41982f699816d4d06e103500185ea50b8ce79 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 28 Aug 2024 16:08:11 -0500 Subject: [PATCH] Update configs.Tests.ps1 --- pester/configs.Tests.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pester/configs.Tests.ps1 b/pester/configs.Tests.ps1 index cf5c5f4c..9162edb9 100644 --- a/pester/configs.Tests.ps1 +++ b/pester/configs.Tests.ps1 @@ -35,7 +35,7 @@ foreach ($configuration in $configurations) { Context "$name config file" { It "Imports with no errors" { - $global:importedconfigs.$name | should -Not -BeNullOrEmpty + $global:importedconfigs.$name | Should -Not -BeNullOrEmpty } if ($config) { It "Imports should be the correct structure" { @@ -44,12 +44,12 @@ foreach ($configuration in $configurations) { $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 ($(Compare-Object $compare $template) -ne $null) { + if ($(Compare-Object $compare $template)) { $result.Add($application) } } - $result | Select-String "WPF*" | should -BeNullOrEmpty + $result | Where-Object { $_ -like "WPF*" } | Should -BeNullOrEmpty } } if($undo) { @@ -80,7 +80,7 @@ foreach ($configuration in $configurations) { } } } - $result | Select-String "WPF*" | should -BeNullOrEmpty + $result | Where-Object { $_ -like "WPF*" } | Should -BeNullOrEmpty } } }