Skip to content

Commit 7a7b4ca

Browse files
committed
Added test for -Severity parameter in Get-ScriptAnalyzerRule
1 parent a509548 commit 7a7b4ca

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Tests/Engine/GetScriptAnalyzerRule.tests.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,16 @@ Describe "Test RuleExtension" {
108108
}
109109

110110
}
111+
}
112+
113+
Describe "TestSeverity" {
114+
It "filters rules based on the specified rule severity" {
115+
$rules = Get-ScriptAnalyzerRule -Severity Error
116+
$rules.Count | Should be 4
117+
}
118+
119+
It "filters rules based on multiple severity inputs"{
120+
$rules = Get-ScriptAnalyzerRule -Severity Error,Information
121+
$rules.Count | Should be 8
122+
}
111123
}

0 commit comments

Comments
 (0)