// Sibling test for c51_render_edit.ts (Layer 1, render). End-to-end // coverage in e2e/editor-flow.spec.ts (login wall, propose-edit // flow) and e2e/git-native-proof.spec.ts (applied-live page). This // sibling pins the export shape. import { describe, test, expect } from "bun:test"; import { renderEditFormPage, renderEditLoginWall, renderEditNonAdminWall, renderEditAppliedLive, renderEditCommitFailed, } from "./b51_render_edit.ts"; describe("c51_render_edit — export shape", () => { test("renderEditFormPage is async", () => { expect(typeof renderEditFormPage).toBe("function"); }); test("renderEditLoginWall is async", () => { expect(typeof renderEditLoginWall).toBe("function"); }); test("renderEditNonAdminWall is async", () => { expect(typeof renderEditNonAdminWall).toBe("function"); }); test("renderEditAppliedLive is async", () => { expect(typeof renderEditAppliedLive).toBe("function"); }); test("renderEditCommitFailed is async", () => { expect(typeof renderEditCommitFailed).toBe("function"); }); }); describe("c51_render_edit — login wall renders a complete document", () => { test("anonymous viewer sees a sign-in prompt", async () => { // ResolvedEdit shape — minimal but realistic. const html = await renderEditLoginWall({ section: "sama", slug: "skill", title: "SAMA skill", pageUrl: "/sama/skill", mdPath: "content/sama/skill.md", body: "# stub", }); expect(html).toContain(""); expect(html.toLowerCase()).toMatch(/sign in|login|github/); }); });