import { transformMsDesktop, transformMsCould } from "../../utilities/paste_transform"; import "../helpers"; const uglifyHtml = (html) => html.replace(/[\r\n]+\s+/g, " ").replace(/>\s+<").trim(); describe("transformMsDesktop", () => { const transform = (html) => { return uglifyHtml(transformMsDesktop(html)); }; it("transforms flat lists to correct list hierarchy", () => { const content = `
1. First item
a. Subitem 1.1
b. Subitem 1.2
2. Second item
a. Subitem 2.1
b. Subitem 2.2
First item
Subitem 1.1
Subitem 1.2
Second item
Subitem 2.1
Subitem 2.2
1.
Single
item list
Single item list
Item 1
Subitem 1.1
Subitem 1.2
Item 2
Subitem 2.1
Item 1
Subitem 1.1
Subitem 1.2
Item 2
Subitem 2.1
Item 1
Subitem 1.1
Subitem 1.2
Item 2
Subitem 2.1
Item 1
Subitem 1.1
Subitem 1.2
Item 2
Subitem 2.1