test: clarify doctor state archive assertions · openclaw/openclaw@3de1de8
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -379,7 +379,10 @@ describe("doctor state integrity oauth dir checks", () => {
|
379 | 379 | }), |
380 | 380 | ); |
381 | 381 | const files = fs.readdirSync(sessionsDir); |
382 | | -expect(files.some((name) => name.startsWith("orphan-session.jsonl.deleted."))).toBe(true); |
| 382 | +const archivedOrphanTranscripts = files.filter((name) => |
| 383 | +name.startsWith("orphan-session.jsonl.deleted."), |
| 384 | +); |
| 385 | +expect(archivedOrphanTranscripts.length).toBeGreaterThan(0); |
383 | 386 | }); |
384 | 387 | |
385 | 388 | it("does not auto-archive orphan transcripts from non-interactive repair mode", async () => { |
@@ -401,7 +404,10 @@ describe("doctor state integrity oauth dir checks", () => {
|
401 | 404 | ); |
402 | 405 | const files = fs.readdirSync(sessionsDir); |
403 | 406 | expect(files).toContain("orphan-session.jsonl"); |
404 | | -expect(files.some((name) => name.startsWith("orphan-session.jsonl.deleted."))).toBe(false); |
| 407 | +const archivedOrphanTranscripts = files.filter((name) => |
| 408 | +name.startsWith("orphan-session.jsonl.deleted."), |
| 409 | +); |
| 410 | +expect(archivedOrphanTranscripts).toEqual([]); |
405 | 411 | }); |
406 | 412 | |
407 | 413 | it.skipIf(process.platform === "win32")( |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。