Repository navigation
Commit ad67e00
fix(test): start every test without a terminal and never block on a real prompt
Tests that exercise the no-terminal path never forced one. They inherited the
runner's stdin, so the suite passed wherever output was redirected, as in CI,
and hung in a developer's terminal: the CLI saw a TTY, opened a real prompt,
and waited for an answer. Three tests timed out at 15 seconds, the run never
exited, and the queued prompts appeared when the terminal was killed.
Every test now starts with stdin reporting no terminal, and pretendTerminal
still switches one on where a test needs it. A prompt that reaches the real
inquire without being mocked fails at once instead of waiting on stdin, so a
future test with the same mistake fails loudly rather than hanging.
Verified under a real pseudo-terminal: the full suite passes, and with the
default reversed the affected tests fail in two seconds rather than hanging.
#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent f77239b commit ad67e00
2 files changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments