mock-prompt
mock inquirer prompt for unit/e2e test
TODO
Make sure the inquirer instance is one.
Installation
$ yarn add mock-prompt --dev # or npm $ npm install mock-prompt --save-dev
Usage
const inquirer = const mockPrompt = const questions = name: 'foo' type: 'input' message: 'foo' name: 'bar' type: 'confirm' message: 'bar' default: false inquirerpromptquestions
API
mockPrompt(fills)
fills
- Type:
object
- Details: fill answers
Contributing
- Fork it on GitHub!
- Clone the fork to your own machine.
- Checkout your feature branch:
git checkout -b my-awesome-feature
- Commit your changes to your own branch:
git commit -am 'Add some feature'
- Push your work back up to your fork:
git push -u origin my-awesome-feature
- Submit a Pull Request so that we can review your changes.
NOTE: Be sure to merge the latest from "upstream" before making a pull request!