CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
profile-readme.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.
| d412586 | 1 | /** |
| 2 | * Block J5 — Profile README smoke. | |
| 3 | * | |
| 4 | * We can't test the full "user has a user/user repo with a README" path | |
| 5 | * without a real git checkout, but we can verify the profile route still | |
| 6 | * responds on the happy + missing paths. | |
| 7 | */ | |
| 8 | ||
| 9 | import { describe, it, expect } from "bun:test"; | |
| 10 | import app from "../app"; | |
| 11 | ||
| 12 | describe("profile README — route smoke", () => { | |
| 13 | it("GET /<unknown-user> renders without blowing up on missing profile repo", async () => { | |
| 14 | // Non-existent user → 200 page (renders with empty ownerUser) or 500 when | |
| 15 | // DB is unreachable. Either way, the profile-readme block must not crash. | |
| 16 | const res = await app.request("/does-not-exist-xyz"); | |
| 17 | expect([200, 404, 500]).toContain(res.status); | |
| 18 | }); | |
| 19 | ||
| 20 | it("GET /login stays a fixed route, not captured by /:owner", async () => { | |
| 21 | const res = await app.request("/login"); | |
| 22 | // login page renders 200 | |
| 23 | expect([200, 302]).toContain(res.status); | |
| 24 | }); | |
| 25 | }); |