import { EnvironmentId, ThreadId } from "@t3tools/contracts"; import { describe, expect, it } from "vite-plus/test"; import { ThreadArchiveBlockedError } from "./useThreadActions"; describe("ThreadArchiveBlockedError", () => { it("keeps the blocked thread context with the fixed message", () => { const error = new ThreadArchiveBlockedError({ environmentId: EnvironmentId.make("environment-1"), threadId: ThreadId.make("thread-1"), }); expect(error).toMatchObject({ environmentId: "environment-1", threadId: "thread-1", }); expect(error.message).toBe("Cannot archive a running thread."); }); });