diff --git a/src/cron/session-reaper.test.ts b/src/cron/session-reaper.test.ts index bad63ad7871..acbac6dbf7c 100644 --- a/src/cron/session-reaper.test.ts +++ b/src/cron/session-reaper.test.ts @@ -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 () => {