Fix terminal test assertion for non-zero exit codes

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 <noreply@anthropic.com>
This commit is contained in:
Mohamed Boudra
2025-11-30 01:22:04 +00:00
parent 315dbe20f3
commit c4c0787286

View File

@@ -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 () => {