Testing prompts
See original GitHub issueHello.
I am trying since a while to determine how I am supposed to create tests for the prompts. Using Enquirer
directly, I can use its events, but using Listr
, I don’t have access to the underlying Enquirer
object.
Is there currently any way to test prompts? Thanks!
EDIT - I think the ability to pass an instance of Enquirer
, the same as logger
, to a Listr
object, would solve the issue, because we would be able to pass a fake Enquirer
object, hence, to test it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
User & Usability Testing Questions: Ultimate Guide
The right user experience testing questions help you gather unbiased user opinions, which ultimately leads to better user experiences.
Read more >Usability Testing Questions: Asking the Right Questions - Hotjar
20+ questions to ask in usability tests—and when to ask them. Usability testing has at least four different stages—screening, pre-test, test, ...
Read more >How To Write Good Usability Testing Questions [2023 Guide]
Post-Testing Questions · How would you describe your overall experience with the product? · What did you like the most about using this...
Read more >Usability Testing Questions: 7 Rules & 25 Examples
7 rules of asking usability testing questions · 1. Ask qualifying questions · 2. Don't ask leading questions · 3. Ask open-ended usability...
Read more >Usability Testing Questions: How to Ask Insightful UX Questions
Ask the right usability testing questions to get the most from your next round of testing, and create products with a truly human-centric...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Can you try the latest beta from
listr2@beta
. I was also writing something basing this as a dependency had to do some minor fixes, so hopefully added your functionality before weekend as well, weeee.Hi Mr. Innocenzi,
I think that idea is feasible and doable. I will have a look at that this weekend because at last, I was also planning to add tests for renderers. I was planning to that with jest-mock-process. Maybe that can be the answer since you can manipulate stdout as well as stdin. But you are right, unfortunately, at the moment there is no easy way to spy on the instance of enquirer since I converted it to be a dynamic import.