Files
kandev/apps/web/lib/session/session-deletion.test.ts
T
Clément Fiere ba96562f04 feat: add quick chat idle dot indicator (#2750)
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
2026-08-18 06:52:26 +00:00

20 lines
703 B
TypeScript

import { describe, expect, it } from "vitest";
import { resolveSessionDeletionTarget } from "./session-deletion";
describe("resolveSessionDeletionTarget", () => {
it("routes a Quick Chat member through its backing task", () => {
expect(
resolveSessionDeletionTarget("session-1", "fallback-task", [
{ sessionId: "session-1", taskId: "task-1", workspaceId: "workspace-1", kind: "chat" },
]),
).toEqual({ kind: "quick-chat-task", taskId: "task-1" });
});
it("routes an ordinary session through session deletion", () => {
expect(resolveSessionDeletionTarget("session-1", "task-1", [])).toEqual({
kind: "session",
sessionId: "session-1",
});
});
});