test: tighten cli transcript session file assertion

This commit is contained in:
Peter Steinberger
2026-05-09 01:15:55 +01:00
parent e2b2ebd86a
commit 553d17618a

View File

@@ -510,8 +510,9 @@ describe("CLI attempt execution", () => {
embeddedAssistantGapFill: true,
});
const sessionFile = updatedFirst?.sessionFile;
expect(sessionFile).toBeTruthy();
if (!sessionFile) {
expect(typeof sessionFile).toBe("string");
expect(sessionFile?.length ?? 0).toBeGreaterThan(0);
if (typeof sessionFile !== "string" || sessionFile.length === 0) {
throw new Error("Expected CLI transcript session file.");
}