From bd3d1fbb58dcc5f3e935d9aadb951142400a8a84 Mon Sep 17 00:00:00 2001 From: Shakker Date: Tue, 12 May 2026 18:34:21 +0100 Subject: [PATCH] test: define markdown structural blocks --- ui/src/ui/markdown.test.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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", () => {