Skip to content

Commit dea5e2b

Browse files
committed
fix(tests): use explicit variable name in PowerShell test to fix Linux compatibility
1 parent ef64915 commit dea5e2b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/integrations/terminal/__tests__/TerminalProcessExec.pwsh.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,10 @@ describePlatform("TerminalProcess with PowerShell Command Output", () => {
286286
it("should handle larger output streams", async () => {
287287
// Generate a larger output stream (but not too large for tests)
288288
const lines = 10
289-
const command = `1..${lines} | ForEach-Object { "Line $_" }`
289+
290+
// Use a more explicit command that works consistently across platforms
291+
// Avoid using $_ which seems to be expanded differently on Linux
292+
const command = `foreach ($i in 1..${lines}) { Write-Output "Line $i" }`
290293

291294
// Build expected output
292295
const expectedOutput = Array.from({ length: lines }, (_, i) => `Line ${i + 1}`).join("\n") + "\n"

0 commit comments

Comments
 (0)