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"); }); });