Skip to content

Commit 808a7eb

Browse files
committed
Add breaks to switch
1 parent 234fae4 commit 808a7eb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Tests/Rules/UseCompatibleCommands.Tests.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,17 +336,20 @@ Describe 'UseCompatibleCommands' {
336336
{
337337
$group.Count | Should -Be 1
338338
$group.Group[0].Command | Should -BeExactly 'Get-WmiObject'
339+
break
339340
}
340341

341342
'New-SelfSignedCertificate'
342343
{
343344
$group.Count | Should -Be 1
344345
$group.Group[0].Command | Should -BeExactly 'New-SelfSignedCertificate'
346+
break
345347
}
346348

347349
default
348350
{
349351
$group | Should -Be $null
352+
break
350353
}
351354
}
352355
}

Tests/Rules/UseCompatibleTypes.Tests.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,17 +203,20 @@ Describe 'UseCompatibleTypes' {
203203
$group.Count | Should -Be 2
204204
$group[0].Group.TargetPlatform.PowerShell.Version.Major | Should -Be 5
205205
$group[1].Group.TargetPlatform.PowerShell.Version.Major | Should -Be 5
206+
break
206207
}
207208

208209
'Microsoft.PowerShellToStringCodeMethods'
209210
{
210211
$group.Count | Should -Be 1
211212
$group[0].Group.TargetPlatform.PowerShell.Version.Major | Should -Be 6
213+
break
212214
}
213215

214216
default
215217
{
216218
$group | Should -Be $null
219+
break
217220
}
218221
}
219222
}

0 commit comments

Comments
 (0)