TestTerminal
A mock implementation of Terminal for use in unit and integration tests.
It allows simulating user input, tracking terminal state changes (like cursor movement or raw mode transitions), and capturing raw ANSI output.
Parameters
width
The initial width of the terminal.
height
The initial height of the terminal.