File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -126,11 +126,13 @@ Describe "Test Path" {
126
126
$withoutPath = Invoke-ScriptAnalyzer - Path $scriptPath
127
127
$withPath.Count | Should - Be $withoutPath.Count
128
128
}
129
+ }
129
130
130
- It " Runs rules on script with more than 10 parser errors" {
131
+ Context " When there are more than 10 errors in a file" {
132
+ It " All errors are found in a file" {
131
133
# this is a script with 12 parse errors
132
- 1 .. 12 | Foreach-Object { ' );' } | Out-File - Encoding ASCII " TestDrive: \badfile.ps1"
133
- $moreThanTenErrors = Invoke-ScriptAnalyzer - Path " TestDrive: \badfile.ps1"
134
+ 1 .. 12 | Foreach-Object { ' );' } | Out-File - Encoding ASCII " ${ TestDrive} \badfile.ps1"
135
+ $moreThanTenErrors = Invoke-ScriptAnalyzer - Path " ${ TestDrive} \badfile.ps1"
134
136
@ ($moreThanTenErrors ).Count | Should - Be 12
135
137
}
136
138
}
You can’t perform that action at this time.
0 commit comments