import { expect, test } from "bun:test"; import { precomputePartialStaticShell } from "../src/partial-build.ts"; test("precomputes nested page components while erasing dynamic region bodies", async () => { const result = await precomputePartialStaticShell( { __wrnexusBuildStaticShell: () => '
', }, [ { name: "Card", mod: { render: (props) => `
${props?.title}
` }, }, ], ); expect(result.regions).toBe(1); expect(result.shell).toContain("
Docs
"); expect(result.shell).toContain('data-wrn-dynamic-placeholder="wrn-region-0"'); expect(result.shell).not.toContain("wrn-dynamic-region"); });