Skip to content

Commit ee22def

Browse files
committed
Update Install-Defaults.Tests.ps1
1 parent d936a11 commit ee22def

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/Install-Defaults.Tests.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,26 +144,26 @@ Describe 'Install-Defaults.ps1 Language Support' -Skip:(-not $IsAdmin) {
144144

145145
Describe 'Install-Defaults.ps1 Configuration Processing' {
146146
BeforeAll {
147-
$ConfigPath = Join-Path -Path $Path -ChildPath "configs"
147+
$script:ConfigPath = Join-Path -Path $Path -ChildPath "configs"
148148
}
149149

150150
It 'Should find configuration files' {
151-
if (Test-Path $ConfigPath) {
152-
$Configs = Get-ChildItem -Path $ConfigPath -Include "*.json" -Recurse
151+
if (Test-Path $script:ConfigPath) {
152+
$Configs = Get-ChildItem -Path $script:ConfigPath -Include "*.json" -Recurse
153153
$Configs | Should -Not -BeNullOrEmpty
154154
}
155155
}
156156

157-
It 'Should process All configs' -Skip:(-not (Test-Path $ConfigPath)) {
158-
$AllConfigs = Get-ChildItem -Path $ConfigPath -Include "*.All.json" -Recurse
157+
It 'Should process All configs' -Skip:(-not (Test-Path $script:ConfigPath)) {
158+
$AllConfigs = Get-ChildItem -Path $script:ConfigPath -Include "*.All.json" -Recurse
159159
if ($AllConfigs) {
160160
$AllConfigs.Count | Should -BeGreaterThan 0
161161
}
162162
}
163163

164-
It 'Should process platform-specific configs' -Skip:(-not (Test-Path $ConfigPath)) {
164+
It 'Should process platform-specific configs' -Skip:(-not (Test-Path $script:ConfigPath)) {
165165
$Platform = if ($OSInfo.IsServer) { 'Server' } else { 'Client' }
166-
$PlatformConfigs = Get-ChildItem -Path $ConfigPath -Include "*.$Platform.json" -Recurse
166+
$PlatformConfigs = Get-ChildItem -Path $script:ConfigPath -Include "*.$Platform.json" -Recurse
167167
if ($PlatformConfigs) {
168168
$PlatformConfigs.Count | Should -BeGreaterThan 0
169169
}

0 commit comments

Comments
 (0)