import { describe, expect, test } from "bun:test"; import { renderToStaticMarkup } from "react-dom/server"; import { BUG_URL, Colophon, FEATURE_URL, bugReportUrl, } from "../src/client/components/Colophon.tsx"; /** * The issue forms, and the app's links into them. * * These pin a seam nothing else can see: GitHub answers a malformed form with a * rendered error only a visitor notices, and it drops a prefill parameter that * names no field with no error at all. Both failures look exactly like a working * link from here, so the only place they can be caught is a test that reads the * YAML the links point at. * * Reads repo files, never build output — see AGENTS.md § Commands. */ const DIR = ".github/ISSUE_TEMPLATE"; /** * Whether the README is in this context at all. * * The image build runs this suite as its gate, and `.dockerignore` excludes the * README along with `docs/` and `AGENTS.md` — deliberately, so that editing a * doc does not invalidate the layer that installs, tests and builds. `.github/` * is copied in for the opposite reason, which is why every other check here runs * there unchanged. * * So the README check stands down where the file was left out on purpose, rather * than failing the image on the absence of something that context does not ship. * It still runs in CI and locally, which is where a README link gets edited. */ const HAS_README = await Bun.file("README.md").exists(); type Field = { type: string; id?: string; attributes?: { label?: string }; validations?: { required?: boolean }; }; type Form = { name?: string; description?: string; labels?: string[]; body?: Field[] }; async function form(file: string): Promise