Skip to content

Commit b3ef54a

Browse files
committed
Change invocation to not ignore errors
Force array of output
1 parent 4c347a1 commit b3ef54a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/Engine/InvokeScriptAnalyzer.tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ Describe "Test Path" {
129129

130130
It "Runs rules on script with more than 10 parser errors" {
131131
# this is a script with 12 parse errors
132-
1..12 | Foreach-Object { ')' } | Out-File "TestDrive:\badfile.ps1"
133-
$moreThanTenErrors = Invoke-ScriptAnalyzer -ErrorAction SilentlyContinue "TestDrive:\badfile.ps1"
134-
$moreThanTenErrors.Count | Should -Be 12
132+
1..12 | Foreach-Object { ');' } | Out-File -Encoding ASCII "TestDrive:\badfile.ps1"
133+
$moreThanTenErrors = Invoke-ScriptAnalyzer -Path "TestDrive:\badfile.ps1"
134+
@($moreThanTenErrors).Count | Should -Be 12
135135
}
136136
}
137137

0 commit comments

Comments
 (0)