g1t/apps/web/app/lib/status.test.ts

22 lines900 bytesCodeBlame

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look1import assert from "node:assert/strict";
2import { test } from "node:test";
3
status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas4import { STATUS_JSON_URL, dotClass, statusTitle } from "./status.ts";
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look5
status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas6test("the status page lives on its own host", () => {
7 assert.equal(STATUS_JSON_URL, "https://status.g1t.sh/status.json");
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look8});
9
status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas10test("the short line is the report's title, else words for its state", () => {
11 assert.equal(statusTitle({ overall: { state: "up", title: "All systems normal", line: "" } }), "All systems normal");
12 assert.equal(statusTitle({ overall: { state: "down", title: "", line: "" } }), "Major outage");
13 assert.equal(statusTitle(null), null);
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look14});
15
16test("each state has its own dot", () => {
17 assert.equal(dotClass("up"), "bg-accent");
18 assert.equal(dotClass("degraded"), "bg-warn");
19 assert.equal(dotClass("down"), "bg-danger");
status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas20 assert.equal(dotClass("unknown"), "bg-faint");
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look21 assert.equal(dotClass(null), "bg-faint");
22});