File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,6 @@ Describe "UseUsingScopeModifierInNewRunspaces" {
146
146
}
147
147
148
148
Context " Should not detect anything" {
149
-
150
149
It " should not emit anything for: <Description>" {
151
150
[System.Array ] $warnings = Invoke-ScriptAnalyzer - ScriptDefinition $ScriptBlock - Settings $settings
152
151
$warnings.Count | Should - Be 0
@@ -293,11 +292,25 @@ Describe "UseUsingScopeModifierInNewRunspaces" {
293
292
}
294
293
}'
295
294
}
296
- # Script block with variables in params(), issue #1504: https://github.com/PowerShell/PSScriptAnalyzer/issues/1504
295
+ # ScriptBlock with variables in params(), issue #1504: https://github.com/PowerShell/PSScriptAnalyzer/issues/1504
296
+ # # Microsoft.PowerShell.Core \ Start-Job
297
297
@ {
298
- Description = ' Does not throw when variable is defined inside params()'
298
+ Description = ' Does not throw when variable is defined inside params() - Start-Job '
299
299
ScriptBlock = ' {
300
-
300
+ Start-Job -ScriptBlock {
301
+ Param($Foo)
302
+ $Foo
303
+ } -ArgumentList "Bar" | Receive-Job -Wait -AutoRemoveJob
304
+ }'
305
+ }
306
+ # # Microsoft.PowerShell.ThreadJob \ Start-ThreadJob
307
+ @ {
308
+ Description = ' Does not throw when variable is defined inside params() - Start-Job'
309
+ ScriptBlock = ' {
310
+ Start-ThreadJob -ScriptBlock {
311
+ Param($Foo)
312
+ $Foo
313
+ } -ArgumentList "Bar" | Receive-Job -Wait -AutoRemoveJob
301
314
}'
302
315
}
303
316
)
You can’t perform that action at this time.
0 commit comments