You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When unit testing functionality that checks Out.IsTerminal, there is no way to override this when using the TestConsole. This is possible with input by using Interactive().
The test in question relates to a pager utility, which should bypass paging if output is redirected. Otherwise, it should configure the pager according to variables.
Describe the solution you'd like IsTerminal and Interactive feel like the same concept, with one related to output and one related to input. As it stands, I'm not sure how to override IsTerminal like I can with Interactive, which is preventing me from writing the tests I'd like.
I'm not sure what a solution should look like and would appreciate any suggestions if there is already a way to achieve this.
Please upvote 👍 this issue if you are interested in it.
This discussion was converted from issue #1869 on August 01, 2025 14:26.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
When unit testing functionality that checks
Out.IsTerminal, there is no way to override this when using theTestConsole. This is possible with input by usingInteractive().The test in question relates to a pager utility, which should bypass paging if output is redirected. Otherwise, it should configure the pager according to variables.
Describe the solution you'd like
IsTerminalandInteractivefeel like the same concept, with one related to output and one related to input. As it stands, I'm not sure how to overrideIsTerminallike I can withInteractive, which is preventing me from writing the tests I'd like.I'm not sure what a solution should look like and would appreciate any suggestions if there is already a way to achieve this.
Please upvote 👍 this issue if you are interested in it.
All reactions