From c4c0787286950ddc609fead02ff31415925a4f66 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Sun, 30 Nov 2025 01:22:04 +0000 Subject: [PATCH] Fix terminal test assertion for non-zero exit codes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test was failing because terminal output wrapping caused "No such file" to be split across lines with a newline between "No" and "such file". The actual output was: "No\n such file or directory" Changed the assertion to check for more reliable parts of the error message: - "cannot access" - always present in ls errors - "nonexistent-directory-test" - the directory name we're testing with This is a test assertion fix, not a code bug. The terminal output is correct, but the test expectation needed to account for line wrapping. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../server/src/server/terminal-mcp/terminal-manager.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/server/terminal-mcp/terminal-manager.test.ts b/packages/server/src/server/terminal-mcp/terminal-manager.test.ts index aec747487..2055e94df 100644 --- a/packages/server/src/server/terminal-mcp/terminal-manager.test.ts +++ b/packages/server/src/server/terminal-mcp/terminal-manager.test.ts @@ -55,7 +55,8 @@ describe("TerminalManager - Command Execution", () => { expect(result.isDead).toBe(true); expect(result.exitCode).not.toBe(0); - expect(result.output).toContain("No such file"); + expect(result.output).toContain("cannot access"); + expect(result.output).toContain("nonexistent-directory-test"); }); it("should handle directory changes in command", async () => {