diff --git a/packages/runtime-tests/integration/render-to-string.test.tsx b/packages/runtime-tests/integration/render-to-string.test.tsx index 8a0d973..c662026 100644 --- a/packages/runtime-tests/integration/render-to-string.test.tsx +++ b/packages/runtime-tests/integration/render-to-string.test.tsx @@ -464,4 +464,147 @@ describe("renderToString", () => { expect(output).toContain("Nested"); expect(output).toContain("deep"); }); + + // ── Nested inherits ancestor styles (Ink wrapping model) ───────── + // + // Ink composes nested by WRAPPING: squash-text-nodes.ts concatenates a + // node's already-styled children, then the PARENT Text's internal_transform + // wraps the WHOLE concatenation. So a parent's boolean styles (bold/italic/ + // underline/strikethrough/dim) stay OPEN across a nested child — the child only + // ADDS its own style on top. The Ink composition is literally + // `chalk.