From 3e2e78c43b8e5dcb05b12bf1a380c7ab6ba818dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E8=8B=8F=E6=B3=A2=20=28Super=20Zheng=29?= Date: Fri, 3 Apr 2026 18:32:51 +0800 Subject: [PATCH] test: fix ui presenter next run test for multi-language environments --- test/ui.presenter-next-run.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/ui.presenter-next-run.test.ts b/test/ui.presenter-next-run.test.ts index 12c2ed4d80d..49e1798c20d 100644 --- a/test/ui.presenter-next-run.test.ts +++ b/test/ui.presenter-next-run.test.ts @@ -10,7 +10,8 @@ describe("formatNextRun", () => { it("includes weekday and relative time", () => { const ts = Date.UTC(2026, 1, 23, 15, 0, 0); const out = formatNextRun(ts); - expect(out).toMatch(/^[A-Za-z]{3}, /); + const weekday = new Date(ts).toLocaleDateString(undefined, { weekday: "short" }); + expect(out.slice(0, weekday.length + 2)).toBe(`${weekday}, `); expect(out).toContain("("); expect(out).toContain(")"); });