File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,16 @@ Describe "RuleSuppressionWithoutScope" {
49
49
}
50
50
}
51
51
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"
57
59
}
58
60
}
61
+ }
59
62
}
60
63
61
64
Describe " RuleSuppressionWithScope" {
You can’t perform that action at this time.
0 commit comments