From 4fd6807d3d8a36e51b7127c07e3f9583567de9f0 Mon Sep 17 00:00:00 2001 From: chengyongru Date: Wed, 30 Sep 2026 17:58:06 +0800 Subject: [PATCH] test(webui): normalize math fixture checkout line endings --- webui/src/tests/markdown-streaming-blocks.test.ts | 4 +++- webui/src/tests/markdown-text-math.test.tsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/webui/src/tests/markdown-streaming-blocks.test.ts b/webui/src/tests/markdown-streaming-blocks.test.ts index 803c3a6a0..69fe08abf 100644 --- a/webui/src/tests/markdown-streaming-blocks.test.ts +++ b/webui/src/tests/markdown-streaming-blocks.test.ts @@ -7,7 +7,9 @@ import { describe, expect, it } from "vitest"; import { parseMathAwareMarkdownBlocks } from "@/lib/markdown-streaming-blocks"; import { remarkTexMath } from "@/lib/remark-tex-math"; -import mixedMath from "@/tests/fixtures/markdown-math-mixed.md?raw"; +import mixedMathFixture from "@/tests/fixtures/markdown-math-mixed.md?raw"; + +const mixedMath = mixedMathFixture.replaceAll("\r\n", "\n"); const formula = String.raw`\[ \tan\left(\frac{\mathrm{HFOV}}{2}\right) diff --git a/webui/src/tests/markdown-text-math.test.tsx b/webui/src/tests/markdown-text-math.test.tsx index 501d1c066..747abc5b7 100644 --- a/webui/src/tests/markdown-text-math.test.tsx +++ b/webui/src/tests/markdown-text-math.test.tsx @@ -2,7 +2,9 @@ import { render, waitFor } from "@testing-library/react"; import { expect, it } from "vitest"; import { MarkdownText } from "@/components/MarkdownText"; -import mixedMath from "@/tests/fixtures/markdown-math-mixed.md?raw"; +import mixedMathFixture from "@/tests/fixtures/markdown-math-mixed.md?raw"; + +const mixedMath = mixedMathFixture.replaceAll("\r\n", "\n"); it("retains a rendered TeX formula when an assistant response completes in streaming layout", async () => { const source = String.raw`Before