import { render, screen } from "@testing-library/react"; import { describe, expect, it } from "vitest"; import { RichText } from "@/components/ui/RichText"; describe("RichText", () => { it("renders evaluator markdown as readable structure instead of raw markers", () => { const { container } = render(); expect(screen.getByRole("heading", { name: "整体结论" })).toBeInTheDocument(); expect(screen.getByText("部分通过").tagName).toBe("STRONG"); expect(screen.getAllByRole("listitem")).toHaveLength(2); expect(container.textContent).not.toContain("##"); expect(container.textContent).not.toContain("**"); }); });