[GH-ISSUE #276] testRender: user input leaks through #72

Closed
opened 2026-03-02 23:44:20 +03:00 by kerem · 1 comment
Owner

Originally created by @veracioux on GitHub (Nov 6, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/276

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
Originally created by @veracioux on GitHub (Nov 6, 2025). Original GitHub issue: https://github.com/anomalyco/opentui/issues/276 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: <img width="828" height="720" alt="Image" src="https://github.com/user-attachments/assets/84472a32-4415-46af-9422-a5184aff8ce1" />
kerem 2026-03-02 23:44:20 +03:00
  • closed this issue
  • added the
    core
    bug
    labels
Author
Owner

@kommander commented on GitHub (Nov 7, 2025):

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

<!-- gh-comment-id:3501814843 --> @kommander commented on GitHub (Nov 7, 2025): The testing setup currently isn't actually mocking process.stdin, the input mocks for key/mouse are writing to the actual process.stdin
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#72
No description provided.