import { describe, expect, it } from "vitest"; import { nestedListsToBlockNoteStructure } from "./nestedLists.js"; async function testHTML(html: string) { const htmlNode = nestedListsToBlockNoteStructure(html); expect(htmlNode.innerHTML).toMatchSnapshot(); } describe("Lift nested lists", () => { it("Lifts nested bullet lists", async () => { const html = ``; await testHTML(html); }); it("Lifts nested bullet lists without li", async () => { const html = ``; await testHTML(html); }); it("Lifts nested bullet lists with content after nested list", async () => { const html = ``; await testHTML(html); }); it("Lifts multiple bullet lists", async () => { const html = ``; await testHTML(html); }); it("Lifts multiple bullet lists with content in between", async () => { const html = ``; await testHTML(html); }); it("Lifts nested numbered lists", async () => { const html = `
  1. Numbered List Item 1
    1. Nested Numbered List Item 1
    2. Nested Numbered List Item 2
  2. Numbered List Item 2
`; await testHTML(html); }); it("Lifts nested mixed lists", async () => { const html = `
  1. Numbered List Item 1
  2. Numbered List Item 2
`; await testHTML(html); }); });