fix(coding-agent): rpc test needs prompt before checking session file

Session files are only written after first assistant message.
The test was checking for a session file without having sent any prompt.
This commit is contained in:
Mario Zechner 2026-02-04 13:27:54 +01:00
parent 13ac63c3cd
commit 4990981e47

View file

@ -290,6 +290,9 @@ describe.skipIf(!process.env.ANTHROPIC_API_KEY && !process.env.ANTHROPIC_OAUTH_T
let state = await client.getState();
expect(state.sessionName).toBeUndefined();
// Send a prompt first - session files are only written after first assistant message
await client.promptAndWait("Reply with just 'ok'");
// Set name
await client.setSessionName("my-test-session");
@ -314,5 +317,5 @@ describe.skipIf(!process.env.ANTHROPIC_API_KEY && !process.env.ANTHROPIC_OAUTH_T
const sessionInfoEntries = entries.filter((e: { type: string }) => e.type === "session_info");
expect(sessionInfoEntries.length).toBe(1);
expect(sessionInfoEntries[0].name).toBe("my-test-session");
}, 30000);
}, 60000);
});