feat: modernize dashboard widgets

This commit is contained in:
Thomas Camlong committed 2026-08-01 21:14:33 +02:00
1 parent fcc5130068
commit d421046d15
286 files changed
+9664 -3282

No files matched your search

@@ -0,0 +1,14 @@
import { describe, expect, test } from "vitest";
import { clampPercentage, getDisplayText } from "./component";
describe("system disk display", () => {
test("clamps malformed utilization before sizing the background", () => {
expect(clampPercentage(-4)).toBe(0);
expect(clampPercentage(108)).toBe(100);
});
test("falls back to provider values when sizes are already formatted", () => {
expect(getDisplayText({ used: "5 GiB", available: "10 GiB", percentage: 50 }, "absolute")).toBe("5 GiB / 10 GiB");
});
});