From d14c11e2d2c4121d8912eebeb202c7c0615271e8 Mon Sep 17 00:00:00 2001 From: Yunfei He Date: Mon, 25 May 2026 22:37:10 +0800 Subject: [PATCH] fix: correct flex basis column test expectations to match Ink output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit height=6 containers produce 6 lines. Ink's renderToString returns "A\n\n\nB\n\n" (preserving trailing blank lines). The tests incorrectly expected "A\n\n\nB" with a comment claiming lastFrame({ trimLines: true }) trims trailing newlines — it does not; it only trims trailing spaces per line. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/runtime-tests/integration/layout/flex.test.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/runtime-tests/integration/layout/flex.test.tsx b/packages/runtime-tests/integration/layout/flex.test.tsx index 4caf5b6..7e08bcb 100644 --- a/packages/runtime-tests/integration/layout/flex.test.tsx +++ b/packages/runtime-tests/integration/layout/flex.test.tsx @@ -115,8 +115,7 @@ test('set flex basis with flexDirection="column" container', async () => { )), { columns: 100 }, ); - // Ink: "A\n\n\nB\n\n" — trailing newlines trimmed by lastFrame({ trimLines: true }) - expect(lastFrame({ trimLines: true })).toBe("A\n\n\nB"); + expect(lastFrame({ trimLines: true })).toBe("A\n\n\nB\n\n"); }); test('set flex basis in percent with flexDirection="column" container', async () => { @@ -131,6 +130,5 @@ test('set flex basis in percent with flexDirection="column" container', async () )), { columns: 100 }, ); - // Ink: "A\n\n\nB\n\n" — trailing newlines trimmed by lastFrame({ trimLines: true }) - expect(lastFrame({ trimLines: true })).toBe("A\n\n\nB"); + expect(lastFrame({ trimLines: true })).toBe("A\n\n\nB\n\n"); });