import { describe, it, expect } from "bun:test"; import { isUsableSummary } from "./summarizer.js"; describe("isUsableSummary", () => { it("accepts non-empty text that stopped normally", () => { expect(isUsableSummary("- did a thing", "stop")).toBe(true); }); it("rejects empty text", () => { expect(isUsableSummary("", "stop")).toBe(false); }); it("rejects whitespace-only text", () => { expect(isUsableSummary(" \n\t ", "stop")).toBe(false); }); it("rejects truncated output even with text", () => { expect(isUsableSummary("- partial", "length")).toBe(false); }); });