(state, cliAnswers = {})
| 14 | // } |
| 15 | |
| 16 | const runInteractiveQuestions = async (state, cliAnswers = {}) => { |
| 17 | Object.keys(cliAnswers).forEach((key) => { |
| 18 | state.answers[key] = cliAnswers[key]; |
| 19 | }); |
| 20 | |
| 21 | const questions = createQuestions(state, cliAnswers); |
| 22 | const answers = await inquirer.prompt(questions); |
| 23 | |
| 24 | Object.keys(state.answers).forEach((key) => { |
| 25 | if (answers[key]) { |
| 26 | state.answers[key] = answers[key]; |
| 27 | } |
| 28 | }); |
| 29 | |
| 30 | return answers; |
| 31 | }; |
| 32 | |
| 33 | module.exports = runInteractiveQuestions; |
no test coverage detected
searching dependent graphs…