The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { EnvironmentId, ThreadId } from "@t3tools/contracts"; |
| 2 | import { describe, expect, it } from "vite-plus/test"; |
| 3 | |
| 4 | import { previewRuntimeTabId } from "./previewRuntimeTabId"; |
| 5 | |
| 6 | describe("previewRuntimeTabId", () => { |
| 7 | it("rejects a pinned operation target after the server epoch changes", () => { |
| 8 | const ref = { |
| 9 | environmentId: EnvironmentId.make("environment-a"), |
| 10 | threadId: ThreadId.make("thread-a"), |
| 11 | }; |
| 12 | const runtimeTabId = previewRuntimeTabId(ref, "epoch-a", "tab_1"); |
| 13 | |
| 14 | expect(previewRuntimeTabId(ref, "epoch-a", "tab_1")).toBe(runtimeTabId); |
| 15 | expect(previewRuntimeTabId(ref, "epoch-b", "tab_1")).not.toBe(runtimeTabId); |
| 16 | }); |
| 17 | }); |