theintern / intern

A next-generation code testing stack for JavaScript.
https://theintern.io/
Other
4.36k stars 309 forks source link

Add a prompt / response system #1130

Open jason0x43 opened 4 years ago

jason0x43 commented 4 years ago

Add functionality to Intern for asking the user for input. This function should be exported on the Intern object and be fairly basic, like:

const name = await intern.askUser('What is your name?');
const toTest = await intern.askUser('What files should be tested?', ['Specific file', 'All', 'Only changed']);

This functionality can be used for various purposes, such as Intern affecting watch mode behavior, a la Jest, or plugins allowing options to be set interactively.