These ideas are exactly what I have been looking for. A year or so ago I started working on a prototype tool[0] using `curses` and I never found a good way to test things beyond behavior of internal methods.
In an effort to make it more portable I have started a re-write[1] in Rust (using `crossterm` this time). This mocking strategy seems like exactly what I need to fix this gap in the app's tests.