Skip to content

Commit 136f67b

Browse files
committed
Trim trailing whitespace in test files
Remove trailing spaces and extraneous blank characters in several test scripts to improve formatting and consistency. Affected files: tests/Install-Defaults.Module.Tests.ps1, tests/Install-Defaults.Tests.ps1, tests/Remove-AppxApps.Tests.ps1. No functional changes were made.
1 parent 56090e9 commit 136f67b

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

tests/Install-Defaults.Module.Tests.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ BeforeAll {
1919
$IsServer2025 = $OS.Caption -match 'Server 2025' -or ($Build -ge 26100 -and $IsServer)
2020
$IsServer2022 = $OS.Caption -match 'Server 2022'
2121
$SupportsLanguagePack = $IsWindows11 -or $IsServer2025
22-
22+
2323
return @{
2424
Build = $Build
2525
IsServer = $IsServer
@@ -57,7 +57,7 @@ Describe 'Module Import' {
5757
'Test-IsOobeComplete',
5858
'Write-LogFile', 'Write-Message'
5959
)
60-
60+
6161
$Module = Get-Module -Name 'Install-Defaults'
6262
foreach ($Function in $ExportedFunctions) {
6363
$Module.ExportedFunctions.Keys | Should -Contain $Function
@@ -179,9 +179,9 @@ Describe 'Set-Registry' {
179179
protected = $false
180180
}
181181
)
182-
182+
183183
{ Set-Registry -Setting $Setting -Confirm:$false } | Should -Not -Throw
184-
184+
185185
if (Test-Path $TestRegPath) {
186186
$Value = Get-ItemProperty -Path $TestRegPath -Name 'TestValue' -ErrorAction SilentlyContinue
187187
$Value.TestValue | Should -Be 'TestData'
@@ -287,7 +287,7 @@ Describe 'Copy-RegExe' {
287287
$Result = Copy-RegExe
288288
$Result | Should -Not -BeNullOrEmpty
289289
Test-Path -Path $Result | Should -Be $true
290-
290+
291291
# Cleanup
292292
if (Test-Path $Result) {
293293
Remove-Item -Path $Result -Force -ErrorAction SilentlyContinue

tests/Install-Defaults.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BeforeAll {
1414
}
1515
$ScriptPath = Get-ChildItem -Path $([System.IO.Path]::Combine($Path, "src")) -Include "Install-Defaults.ps1" -Recurse | Select-Object -First 1
1616
$ModulePath = Get-ChildItem -Path $([System.IO.Path]::Combine($Path, "src")) -Include "Install-Defaults.psm1" -Recurse | Select-Object -First 1
17-
17+
1818
# Helper function to get OS version
1919
function Get-OSVersionInfo {
2020
$OS = Get-CimInstance -ClassName CIM_OperatingSystem
@@ -23,7 +23,7 @@ BeforeAll {
2323
$IsWindows11 = $OS.Caption -match 'Windows 11' -or ($Build -ge 22000 -and -not $IsServer)
2424
$IsServer2025 = $OS.Caption -match 'Server 2025' -or ($Build -ge 26100 -and $IsServer)
2525
$SupportsLanguagePack = $IsWindows11 -or $IsServer2025
26-
26+
2727
return @{
2828
Build = $Build
2929
IsServer = $IsServer
@@ -223,7 +223,7 @@ Describe 'Install-Defaults.ps1 Logging' -Skip:(-not $IsAdmin) {
223223
# Check for log file
224224
$LogPath = "$Env:SystemRoot\Logs\defaults\WindowsEnterpriseDefaults.log"
225225
$IntunePath = "$Env:ProgramData\Microsoft\IntuneManagementExtension\Logs\WindowsEnterpriseDefaults.log"
226-
226+
227227
$LogExists = (Test-Path -Path $LogPath) -or (Test-Path -Path $IntunePath)
228228
$LogExists | Should -Be $true
229229
}

tests/Remove-AppxApps.Tests.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ BeforeAll {
1515
else {
1616
$ScriptPath = Join-Path -Path $PSScriptRoot -ChildPath "..\src\Remove-AppxApps.ps1"
1717
}
18-
18+
1919
# Helper function to get OS version
2020
function Get-OSVersionInfo {
2121
$OS = Get-CimInstance -ClassName CIM_OperatingSystem
@@ -24,7 +24,7 @@ BeforeAll {
2424
$IsWindows11 = $OS.Caption -match 'Windows 11' -or ($Build -ge 22000 -and -not $IsServer)
2525
$IsWindows10 = $OS.Caption -match 'Windows 10'
2626
$IsClient = -not $IsServer
27-
27+
2828
return @{
2929
Build = $Build
3030
IsServer = $IsServer
@@ -44,7 +44,7 @@ Describe 'Remove-AppxApps Script Requirements' {
4444
if (-not $OSInfo.IsClient) {
4545
Set-ItResult -Skipped -Because "Remove-AppxApps.ps1 requires Windows Client OS. Current OS: $($OSInfo.Caption)"
4646
}
47-
47+
4848
$OSInfo.IsClient | Should -Be $true
4949
}
5050

@@ -91,7 +91,7 @@ Describe 'Remove-AppxApps on Windows 11' -Skip:(-not $OSInfo.IsWindows11 -or -no
9191
'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe',
9292
'Microsoft.SecHealthUI_8wekyb3d8bbwe'
9393
)
94-
94+
9595
foreach ($Package in $EssentialPackages) {
9696
$SafePackageList | Should -Contain $Package
9797
}
@@ -166,7 +166,7 @@ Describe 'Remove-AppxApps Safety Checks' -Skip:(-not $OSInfo.IsClient) {
166166
'Microsoft.WindowsTerminal_8wekyb3d8bbwe',
167167
'Microsoft.SecHealthUI_8wekyb3d8bbwe'
168168
)
169-
169+
170170
foreach ($Package in $EssentialPackages) {
171171
$SafePackageList | Should -Contain $Package
172172
}

0 commit comments

Comments
 (0)