diff --git a/test/powershell/engine/Api/PSCommand.Tests.ps1 b/test/powershell/engine/Api/PSCommand.Tests.ps1 index 373951cd29e..0b0be2280f8 100644 --- a/test/powershell/engine/Api/PSCommand.Tests.ps1 +++ b/test/powershell/engine/Api/PSCommand.Tests.ps1 @@ -54,14 +54,13 @@ Describe "PSCommand API tests" -Tag "CI" { # We manually create a CmdletInfo here (with an unresolable command) to verify that CmdletInfo's are cloned. $cmdlet = [System.Management.Automation.CmdletInfo]::new('un-resolvable', [Microsoft.PowerShell.Commands.OutStringCommand]) - $null = $otherShell.AddCommand($cmdlet).AddParameter("InputObject", 'test') + $null = $otherShell.AddCommand($cmdlet).AddParameter("InputObject", 'test').AddParameter("Stream") # Setter for "Commands" calls PSCommand.Clone() $shell.Commands = $otherShell.Commands $result = $shell.Invoke() - $result | Should -Be "test -" + $result | Should -Be "test" } finally { $otherShell.Dispose()