${themedSwatch("#58a6ff")} GitHub $???
`, ); }); Deno.test("github spend: a source that rejects without an Error remains unavailable", async () => { const rejected = new RejectedRoute("billing stopped"); const result = await view("2026-01-20T09:00:00Z", { [usagePath(2026, 1)]: rejected, [classicPath()]: rejected, }); assertEquals(result.status, "unknown"); assertEquals(result.value, "—"); assertEquals(result.sub, "GitHub spend unavailable"); }); Deno.test("github spend: GITHUB_TOKEN works, and the org defaults to the CI tiles' repo owner", async () => { const org = REPO.split("/")[0]; const v = await view( "2026-01-20T09:00:00Z", { [usagePath(2026, 1, org)]: { usageItems: [...days(2026, 1, 1, 10, 18), stillReporting("2026-01-18")], }, }, { GITHUB_TOKEN: "gh_pat_x" }, ); assertEquals(v.value, "~$310/mo"); assertEquals( v.href, `https://github.com/organizations/${org}/settings/billing`, ); assert(org.length > 0); });