Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history

org-insights.test.ts

Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.

org-insights.test.tsBlame28 lines · 1 contributor
8f50ed0Claude1/**
2 * Block F2 — Org insights smoke tests.
3 */
4
5import { describe, it, expect } from "bun:test";
6import app from "../app";
7import { computeOrgInsights } from "../routes/org-insights";
8
9describe("org-insights — route smoke", () => {
10 it("GET /orgs/:slug/insights without auth → 302 /login", async () => {
11 const res = await app.request("/orgs/nobody/insights");
12 expect(res.status).toBe(302);
13 const loc = res.headers.get("location") || "";
14 expect(loc.startsWith("/login")).toBe(true);
15 });
16});
17
18describe("org-insights — computeOrgInsights", () => {
19 it("returns empty summary for unknown org id", async () => {
20 const s = await computeOrgInsights(
21 "00000000-0000-0000-0000-000000000000"
22 );
23 expect(s.repoCount).toBe(0);
24 expect(s.gateRunsTotal).toBe(0);
25 expect(s.greenRate).toBe(0);
26 expect(s.perRepo).toEqual([]);
27 });
28});