Update configs.Tests.ps1

This commit is contained in:
Chris Titus 2024-08-28 16:03:49 -05:00
parent 31ec62f00b
commit be9fae199c

View File

@ -9,7 +9,7 @@ Get-ChildItem .\config | Where-Object {$_.Extension -eq ".json"} | ForEach-Objec
# Tests - Application Installs # Tests - Application Installs
#=========================================================================== #===========================================================================
Describe "Config Files" -ForEach @( $configurations = @(
@{ @{
name = "applications" name = "applications"
config = $('{ config = $('{
@ -25,7 +25,14 @@ Describe "Config Files" -ForEach @(
name = "tweaks" name = "tweaks"
undo = $true undo = $true
} }
) { )
foreach ($configuration in $configurations) {
Describe "Config Files - $($configuration.name)" {
$name = $configuration.name
$config = $configuration.config
$undo = $configuration.undo
Context "$name config file" { Context "$name config file" {
It "Imports with no errors" { It "Imports with no errors" {
$global:importedconfigs.$name | should -Not -BeNullOrEmpty $global:importedconfigs.$name | should -Not -BeNullOrEmpty
@ -76,6 +83,6 @@ Describe "Config Files" -ForEach @(
$result | Select-String "WPF*" | should -BeNullOrEmpty $result | Select-String "WPF*" | should -BeNullOrEmpty
} }
} }
}
} }
} }