fix(ci): stabilize windows tests

This commit is contained in:
Peter Steinberger
2026-01-08 02:44:09 +00:00
parent f3f5e49d94
commit fbeb9e6775
10 changed files with 148 additions and 62 deletions

View File

@@ -138,7 +138,9 @@ describe("sessions", () => {
{ CLAWDBOT_STATE_DIR: "/custom/state" } as NodeJS.ProcessEnv,
() => "/home/ignored",
);
expect(dir).toBe("/custom/state/agents/main/sessions");
expect(dir).toBe(
path.join(path.resolve("/custom/state"), "agents", "main", "sessions"),
);
});
it("falls back to CLAWDIS_STATE_DIR for session transcripts dir", () => {
@@ -146,7 +148,9 @@ describe("sessions", () => {
{ CLAWDIS_STATE_DIR: "/legacy/state" } as NodeJS.ProcessEnv,
() => "/home/ignored",
);
expect(dir).toBe("/legacy/state/agents/main/sessions");
expect(dir).toBe(
path.join(path.resolve("/legacy/state"), "agents", "main", "sessions"),
);
});
it("includes topic ids in session transcript filenames", () => {
@@ -155,7 +159,13 @@ describe("sessions", () => {
try {
const sessionFile = resolveSessionTranscriptPath("sess-1", "main", 123);
expect(sessionFile).toBe(
"/custom/state/agents/main/sessions/sess-1-topic-123.jsonl",
path.join(
path.resolve("/custom/state"),
"agents",
"main",
"sessions",
"sess-1-topic-123.jsonl",
),
);
} finally {
if (prev === undefined) {