CommandAppTester overrides console #1713
byte2pixel
started this conversation in
Ideas
Replies: 2 comments 6 replies
-
A fix has been approved @byte2pixel, see here: #1718 |
Beta Was this translation helpful? Give feedback.
3 replies
-
Sure, something good for someone new to the project.
…On Fri, Jan 31, 2025, 09:30 Frank Ray ***@***.***> wrote:
There are other open issues @byte2pixel <https://github.com/byte2pixel>
if you want to contribute - if so, let me know and I can suggest some to
look.
—
Reply to this email directly, view it on GitHub
<#1713 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHQZUTM2VHVBESJLB557B532NOJIDAVCNFSM6AAAAABTLO5J66VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMBRHEYTGOA>
.
You are receiving this because you were mentioned.Message ID:
<spectreconsole/spectre.console/repo-discussions/1713/comments/12019138@
github.com>
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been banging my head as to why my unit tests of a single command will pass with doing interactive things. I can create a
TestConsole()
and set.Interactive = true
and provide inputs and it works.But if I create an integration test using CommandAppTester no matter what I do I always get the console is not interactive.
What I found is that CommandAppTester ignores any console I try to provide.
Whether I try using dependency injection, or
app.ConfigureConsole
I found the reason why.
CommandAppTester doesn't use any configured console or check for one in the DI container it just creates a new one.
What I think should happen is maybe
configurator.Settings.Console
and if not thereThoughts?
If approved, I would be willing to create an issue and open a PR.
Beta Was this translation helpful? Give feedback.
All reactions