Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

954 B
Raw Blame
import { ThreadId } from "@akeru/contracts";
import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vite-plus/test";

import { ComposerPendingTerminalContextChip } from "./ComposerPendingTerminalContexts";

describe("ComposerPendingTerminalContextChip", () => {
  it("renders expired terminal contexts with error styling", () => {
    const markup = renderToStaticMarkup(
      <ComposerPendingTerminalContextChip
        context={{
          id: "ctx-expired",
          threadId: ThreadId.make("thread-1"),
          terminalId: "default",
          terminalLabel: "Terminal 1",
          lineStart: 2,
          lineEnd: 4,
          text: "",
          createdAt: "2026-03-17T18:42:05.449Z",
        }}
      />,
    );

    expect(markup).toContain('data-terminal-context-expired="true"');
    expect(markup).toContain("border-destructive/35");
    expect(markup).toContain("Terminal 1 lines 2-4");
  });
});