fix(core): detect uninitialized lines (#24646)

This commit is contained in:
Jacob Richman
2026-04-03 17:51:29 -07:00
committed by GitHub
parent 65024d4538
commit ec35ebbe57
9 changed files with 52 additions and 9 deletions
@@ -30,11 +30,12 @@ describe('terminalSerializer', () => {
allowProposedApi: true,
});
const result = serializeTerminalToObject(terminal);
expect(result).toHaveLength(24);
expect(result).toHaveLength(1);
result.forEach((line) => {
// Expect each line to be either empty or contain a single token with spaces
// Actually, the first cell will have inverse: true (cursor), so it will have multiple tokens
if (line.length > 0) {
expect(line[0].text.trim()).toBe('');
expect(line[line.length - 1].text.trim()).toBe('');
}
});
});