Test: 10 more widget components (B)

This commit is contained in:
shamoon
2026-02-02 22:47:58 -08:00
parent cbf6aef635
commit 103c20dfd6
12 changed files with 699 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ afterEach(() => {
// implement a couple of common formatters mocked in next-i18next
vi.mock("next-i18next", () => ({
useTranslation: () => ({
i18n: { language: "en" },
t: (key, opts) => {
if (key === "common.number") return String(opts?.value ?? "");
if (key === "common.percent") return String(opts?.value ?? "");
@@ -19,6 +20,7 @@ vi.mock("next-i18next", () => ({
if (key === "common.byterate") return String(opts?.value ?? "");
if (key === "common.duration") return String(opts?.value ?? "");
if (key === "common.ms") return String(opts?.value ?? "");
if (key === "common.relativeDate") return String(opts?.value ?? "");
return key;
},
}),