Skip to content

Commit 60cc4ee

Browse files
fix: setup mock for existing session in test
1 parent a778e23 commit 60cc4ee

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

registry/coder/modules/claude-code/main.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,17 @@ describe("claude-code", async () => {
205205
ai_prompt: "test prompt",
206206
},
207207
});
208+
209+
const projectDir = "/home/coder/project";
210+
const projectDirName = projectDir.replace(/\//g, "-");
211+
const sessionDir = `/home/coder/.claude/projects/${projectDirName}`;
212+
await execContainer(id, ["mkdir", "-p", sessionDir]);
213+
await execContainer(id, [
214+
"bash",
215+
"-c",
216+
`echo '{"type":"user","isSidechain":false}' > ${sessionDir}/session-123.jsonl`,
217+
]);
218+
208219
await execModuleScript(id);
209220

210221
const startLog = await execContainer(id, [

0 commit comments

Comments
 (0)