fix: correct flex basis column test expectations to match Ink output
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user