import { expect, test } from "bun:test"; import { fillSlots } from "../src/runtime.ts"; test("an outer default slot preserves a nested component's named slots", () => { const child = '
Inbox
Message
'; const shell = fillSlots("
", child, true); expect(shell).toContain(child); const panes = fillSlots( '
', '
Inbox
Message
', true, ); expect(panes).toContain("Inbox"); expect(panes).toContain("Message"); }); test("void children do not swallow following direct named slots", () => { const html = fillSlots( '', 'Text
Heading

Body

', ); expect(html).toBe("HeadingText

Body

"); });