opentui icon indicating copy to clipboard operation
opentui copied to clipboard

testRender: user input leaks through

Open veracioux opened this issue 2 months ago • 1 comments

When I run tests in a terminal and then press some keys, they leak into the test. The tests were set up using plain await testRender(() => <App/>)

For example, I ran a few tests and kept holding the a key. This is what happened:

Image

veracioux avatar Nov 06 '25 21:11 veracioux

The testing setup currently isn't actually mocking process.stdin, the input mocks for key/mouse are writing to the actual process.stdin

kommander avatar Nov 07 '25 10:11 kommander