dialoguer
dialoguer copied to clipboard
How to write unit testing for dialoguer ?
Thank you for this great project :)
I wrote an interactive cli program. I want to do unit tests for some of these input actions to try to improve my test coverage.
But I have encountered difficulties, I tried to use io::stdout, but it didn't work.
How do I test the movements of dialoguer?
Unfortunately, I haven't looked into it, but I am open to PRs.
Unfortunately, I haven't looked into it, but I am open to PRs.
Thank for your precious time to answer my question! I'll try to find another way.
I was about to ask the same question... I was wondering if there was a stub implementation for the IO in Term, maybe it's possible to just stub Term?
Might be worth merging #158 before embarking on this, in order to track the progress
That is, assuming whatever is used to unit test crates using dialoguer is also used to unit test dialoguer itself