feat: migrate drainage frontend to Vite

This commit is contained in:
2026-07-22 12:47:36 +08:00
parent e0cfa3d6eb
commit 72850761ce
213 changed files with 5726 additions and 5283 deletions
@@ -0,0 +1,16 @@
import { describe, expect, it } from "vitest";
import { getConditionReportRiskLevel } from "./condition-report-risk";
describe("getConditionReportRiskLevel", () => {
it("maps error and warning statuses to their operational risk levels", () => {
expect(getConditionReportRiskLevel("error", "normal")).toBe("critical");
expect(getConditionReportRiskLevel("warning", "normal")).toBe("attention");
});
it("preserves the explicit risk level for lifecycle-only statuses", () => {
expect(getConditionReportRiskLevel("completed", "normal")).toBe("normal");
expect(getConditionReportRiskLevel("completed", "attention")).toBe("attention");
expect(getConditionReportRiskLevel("running", "critical")).toBe("critical");
});
});