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
I am hoping to write some tests for our open source data infrastructure tool CNDI, which is a CLI we built with Deno and Cliffy. Does anyone have a good strategy for programmatically answering interactive prompts we present, to validate outcomes in automated tests?
eg: we have a command cndi init --interactive is setup to ask the user for a "project name", and presenting the prompt by invoking the command function is simple enough, but I am unsure how to automatically enter an example project name in the deno test environment
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
-
I am hoping to write some tests for our open source data infrastructure tool CNDI, which is a CLI we built with Deno and Cliffy. Does anyone have a good strategy for programmatically answering interactive prompts we present, to validate outcomes in automated tests?
eg: we have a command
cndi init --interactive
is setup to ask the user for a "project name", and presenting the prompt by invoking the command function is simple enough, but I am unsure how to automatically enter an example project name in thedeno test
environmentThanks for your time!
Beta Was this translation helpful? Give feedback.
All reactions