test: clarify cron session reaper assertion

This commit is contained in:
Peter Steinberger
2026-05-08 10:42:42 +01:00
parent 3dfe70b8f8
commit 4213d8f4d9

View File

@@ -136,7 +136,10 @@ describe("sweepCronRunSessions", () => {
expect(result.pruned).toBe(1);
expect(fs.existsSync(runTranscript)).toBe(false);
const files = fs.readdirSync(tmpDir);
expect(files.some((name) => name.startsWith(`${runSessionId}.jsonl.deleted.`))).toBe(true);
const archivedRunTranscripts = files.filter((name) =>
name.startsWith(`${runSessionId}.jsonl.deleted.`),
);
expect(archivedRunTranscripts.length).toBeGreaterThan(0);
});
it("does not archive external transcript paths for pruned runs", async () => {