21 lines · 857 B · TypeScript
RawDownload
import { describe, expect, it } from "@effect/vitest"; import { worstHealthStatus } from "./health-display"; describe("worstHealthStatus", () => {  it("orders expired above degraded above healthy", () => {    expect(worstHealthStatus(["healthy", "degraded", "healthy"])).toBe("degraded");    expect(worstHealthStatus(["degraded", "expired", "healthy"])).toBe("expired");    expect(worstHealthStatus(["healthy", "healthy"])).toBe("healthy");  });   it("ignores unknown connections when aggregating", () => {    expect(worstHealthStatus(["unknown", "healthy", "unknown"])).toBe("healthy");    expect(worstHealthStatus(["unknown", "expired"])).toBe("expired");  });   it("has no verdict when nothing has been probed", () => {    expect(worstHealthStatus([])).toBeNull();    expect(worstHealthStatus(["unknown", "unknown"])).toBeNull();  });});

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t