import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it, vi } from "vitest";
import { MarkdownContent } from "./MarkdownContent";

describe("MarkdownContent", () => {
  it("renders ask-about controls for paragraphs and list items when enabled", () => {
    const html = renderToStaticMarkup(
      <MarkdownContent
        content={"A verification paragraph.\n\n- First checklist item"}
        onAskExcerpt={vi.fn()}
      />,
    );

    expect(html).toContain("Ask about this paragraph");
    expect(html).toContain("Ask about this item");
  });
});
