8000 test(aider): refine tmux condition checks in script content verificat… · coder/modules@de197d4 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit de197d4

Browse files
test(aider): refine tmux condition checks in script content verification for clarity and accuracy
1 parent c477b52 commit de197d4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

aider/main.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,12 @@ describe("aider", async () => {
7474
// Instead of running the script, just verify the script content
7575
// to ensure the tmux parameter is being properly applied
7676
const instance = findResourceInstance(state, "coder_script");
77-
expect(instance.script.includes("${var.use_tmux}")).toBe(true);
7877

79-
// Make sure the generated script contains the condition for tmux
80-
expect(instance.script.includes('if [ "${var.use_tmux}" = "true" ]')).toBe(true);
78+
// Check for the correct tmux condition with the interpolated value
79+
expect(instance.script.includes('if [ "true" = "true" ]')).toBe(true);
8180

82-
// This is sufficient to verify the parameter is being passed correctly,
83-
// without trying to test the runtime behavior which is difficult in the test env
81+
// Also check for a unique string only present when tmux is used in the script
82+
expect(instance.script.includes('tmux new-session -d -s')).toBe(true);
8483
});
8584

8685
it("configures task reporting when enabled", async () => {

0 commit comments

Comments
 (0)
0