diff --git a/ui/src/ui/markdown.test.ts b/ui/src/ui/markdown.test.ts index 5fcc41ab21e..fee5e9c5d26 100644 --- a/ui/src/ui/markdown.test.ts +++ b/ui/src/ui/markdown.test.ts @@ -363,9 +363,9 @@ describe("toSanitizedMarkdownHtml", () => { it("collapses JSON code blocks", () => { const html = toSanitizedMarkdownHtml('```json\n{"key": "value"}\n```'); - expect(html).toContain("JSON ยท 2 lines
json
{"key": "value"}\n
', + ); }); }); @@ -386,11 +386,9 @@ describe("toSanitizedMarkdownHtml", () => { "Text after.", ].join("\n"); const html = toSanitizedMarkdownHtml(md); - expect(html).toContain(""); - expect(html).toContain("Text before."); - expect(html).toContain("Text after."); - expect(html).not.toContain("|---|"); + expect(html).toBe( + "

Text before.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
AB
12
\n

Text after.

\n", + ); }); it("renders basic markdown", () => {