We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8ef319 commit cc3f16cCopy full SHA for cc3f16c
Tests/Rules/UseCompatibleSyntax.Tests.ps1
@@ -84,7 +84,16 @@ Describe "PSUseCompatibleSyntax" {
84
85
$diagnostics = Invoke-ScriptAnalyzer -IncludeRule PSUseCompatibleSyntax -Path "$PSScriptRoot/CompatibilityRuleAssets/IncompatibleScript.ps1" -Settings $settings
86
87
- $diagnostics.Count | Should -Be 5
+ if ($PSVersionTable.PSVersion.Major -ge 5)
88
+ {
89
+ $expected = 5
90
+ }
91
+ else
92
93
+ $expected = 4
94
95
+
96
+ $diagnostics.Count | Should -Be $expected
97
}
98
99
It "Ensures there are no incompatibilities in PSSA build files" {
0 commit comments