import { renderToStaticMarkup } from "react-dom/server"; import ReactMarkdown from "react-markdown"; import remarkGfm from "remark-gfm"; import { List, ListItem } from "@/components/MemoContent/markdown"; import { TASK_LIST_CLASS, TASK_LIST_ITEM_CLASS } from "@/components/MemoContent/constants"; import { remarkSplitMixedTaskLists } from "@/utils/remark-plugins/remark-split-mixed-task-lists"; import { describe, expect, it } from "vitest"; const renderListContent = (content: string): string => renderToStaticMarkup( {children}, li: ({ children, ...props }) => {children}, }} > {content} , ); describe("memo content lists", () => { it("keeps bullets on regular items in mixed task and bullet lists", () => { const html = renderListContent("- [ ] pickup package\n- [ ] library returns\n\n- milk\n- eggs\n- bread"); const listOpenTags = html.match(/