test: tighten cli transcript session file assertion · openclaw/openclaw@553d176
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -510,8 +510,9 @@ describe("CLI attempt execution", () => {
|
510 | 510 | embeddedAssistantGapFill: true, |
511 | 511 | }); |
512 | 512 | const sessionFile = updatedFirst?.sessionFile; |
513 | | -expect(sessionFile).toBeTruthy(); |
514 | | -if (!sessionFile) { |
| 513 | +expect(typeof sessionFile).toBe("string"); |
| 514 | +expect(sessionFile?.length ?? 0).toBeGreaterThan(0); |
| 515 | +if (typeof sessionFile !== "string" || sessionFile.length === 0) { |
515 | 516 | throw new Error("Expected CLI transcript session file."); |
516 | 517 | } |
517 | 518 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。