inquirer-test
Functional testing for inquirer.js
Could be use to test output of commands with regexs or side effects from running a script.
E.g. with project generators you provide a combinations of control keys and text inputs and ensure that files are generated with
fs
or other modules.
Install
$ npm install inquirer-test --save-dev
Usage
// cli.js const inquirer = ;const outputs = 'TEST-1' 'TEST-2' 'TEST-3'; inquirerprompt type: 'list' name: 'q' message: 'hi' choices: '1' '2' '3' ;
// test.js ;; const cliPath = __dirname + '/cli.js'; ; ; ; ; ;
Changelog
v2.0.0
- change cliPath to
child_process
arguments array - update to
inquirer@4
- change cliPath to
Related
License
MIT © ewnd9