Testing a CLI tool using a web-based terminal
How do you test an interactive command line tool? 🤔 My answer: use the web! 🔌 Recently I’ve been porting my cli tool pr-cli from Go to Deno (Typescript). I wanted to take it one step further and also add tests for it. ❓ I got ready to write some tests and realized I had no idea how to go about it. For non-interactive CLI tools you can test input/output, but how do you check and interact with prompts halfway through the program? ...