File size: 584 Bytes
837e3ac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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");
  });
});