File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,13 +49,16 @@ Describe "RuleSuppressionWithoutScope" {
4949 }
5050 }
5151
52- Context " Bad Rule Suppression" {
53- It " Throws a non-terminating error" {
54- Invoke-ScriptAnalyzer - ScriptDefinition $ruleSuppressionBad - IncludeRule " PSAvoidUsingUserNameAndPassWordParams" - ErrorVariable errorRecord 2> $null
55- $errorRecord.Count | Should Be 1
56- $errorRecord.FullyQualifiedErrorId | Should match " suppression message attribute error"
52+ if (! $testingLibraryUsage )
53+ {
54+ Context " Bad Rule Suppression" {
55+ It " Throws a non-terminating error" {
56+ Invoke-ScriptAnalyzer - ScriptDefinition $ruleSuppressionBad - IncludeRule " PSAvoidUsingUserNameAndPassWordParams" - ErrorVariable errorRecord - ErrorAction SilentlyContinue
57+ $errorRecord.Count | Should Be 1
58+ $errorRecord.FullyQualifiedErrorId | Should match " suppression message attribute error"
5759 }
5860 }
61+ }
5962}
6063
6164Describe " RuleSuppressionWithScope" {
You can’t perform that action at this time.
0 commit comments