mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-08-23 08:02:07 +00:00
Add comprehensive test suite, fix minor issues, rename function and file names to match approved verbs (#708)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
BeforeAll {
|
||||
$rebootFeatureLabelsScriptPath = Join-Path $PSScriptRoot '..\Scripts\Helpers\Get-RebootFeatureLabels.ps1'
|
||||
. $rebootFeatureLabelsScriptPath
|
||||
}
|
||||
|
||||
Describe 'Get-RebootFeatureLabels' {
|
||||
BeforeEach {
|
||||
$script:Params = @{
|
||||
ApplyFeature = $true
|
||||
NoRebootFeature = $true
|
||||
}
|
||||
$script:UndoParams = @{
|
||||
UndoFeature = $true
|
||||
ApplyFeature = $true
|
||||
}
|
||||
$script:Features = @{
|
||||
ApplyFeature = [PSCustomObject]@{ RequiresReboot = $true; Label = 'Apply feature'; UndoLabel = 'Undo apply feature' }
|
||||
UndoFeature = [PSCustomObject]@{ RequiresReboot = $true; Label = 'Undoable feature'; UndoLabel = 'Undo feature' }
|
||||
NoRebootFeature = [PSCustomObject]@{ RequiresReboot = $false; Label = 'No reboot'; UndoLabel = 'Undo no reboot' }
|
||||
}
|
||||
}
|
||||
|
||||
It 'includes reboot-required selections once and uses undo labels for undo operations' {
|
||||
$result = @(Get-RebootFeatureLabels)
|
||||
|
||||
$result | Should -HaveCount 2
|
||||
$result | Should -Contain 'Undo apply feature'
|
||||
$result | Should -Contain 'Undo feature'
|
||||
$result | Should -Not -Contain 'No reboot'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user