Skip to content

Commit 20b2ee5

Browse files
test(gateway): keep chat abort coverage within lint budget
1 parent bf2f9a4 commit 20b2ee5

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

‎src/gateway/chat-abort.test.ts‎

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -790,23 +790,13 @@ describe("resolveInFlightRunSnapshot", () => {
790790
return result;
791791
};
792792

793-
it("returns the live assistant text of a matching active run", () => {
794-
const result = snap({
795-
chatAbortControllers: new Map([["run-1", inFlightEntry("agent:main:tui-x")]]),
796-
chatRunBuffers: new Map([["run-1", "partial answer so far"]]),
797-
sessionKey: "agent:main:tui-x",
798-
});
799-
expect(result).toEqual({ runId: "run-1", text: "partial answer so far" });
800-
});
801-
802-
it("returns the authoritative run start timestamp", () => {
803-
const startedAtMs = 1_234;
793+
it("returns live assistant text with the authoritative run start timestamp", () => {
804794
const result = resolveSnap({
805-
chatAbortControllers: new Map([["run-1", inFlightEntry("agent:main:s", { startedAtMs })]]),
806-
chatRunBuffers: new Map(),
807-
sessionKey: "agent:main:s",
795+
chatAbortControllers: new Map([["run-1", inFlightEntry("s", { startedAtMs: 1_234 })]]),
796+
chatRunBuffers: new Map([["run-1", "partial answer so far"]]),
797+
sessionKey: "s",
808798
});
809-
expect(result?.startedAt).toBe(startedAtMs);
799+
expect(result).toEqual({ runId: "run-1", text: "partial answer so far", startedAt: 1_234 });
810800
});
811801

812802
it("returns the active run plan snapshot with buffered text", () => {

0 commit comments

Comments
 (0)