Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. 🫖 Status page with uptime monitoring & API monitoring as code 🫖 openstatus.dev
Something went wrong. Try again.
555 B · 19 lines
TypeScript
at main
1234567891011121314151617181920import { describe, expect, it } from "vitest";
import { type PageUpdateStatus, statusLabel } from "./status";
describe("statusLabel", () => { const labels: Record<PageUpdateStatus, string> = { investigating: "Investigating", identified: "Identified", monitoring: "Monitoring", resolved: "Resolved", maintenance: "Planned Maintenance", };
for (const [status, label] of Object.entries(labels)) { it(`labels ${status} as "${label}"`, () => { expect(statusLabel(status as PageUpdateStatus)).toBe(label); }); }});