(newCommandOptions, _testAnswers)
| 7 | |
| 8 | class InteractiveNewTask extends Task { |
| 9 | async run(newCommandOptions, _testAnswers) { |
| 10 | const inquirer = await import('inquirer'); |
| 11 | |
| 12 | let prompt = inquirer.createPromptModule(); |
| 13 | let questions = await this.getQuestions(newCommandOptions); |
| 14 | let answers = await prompt(questions, _testAnswers); |
| 15 | |
| 16 | answers.lang = answers.langSelection || answers.langDifferent; |
| 17 | |
| 18 | delete answers.langSelection; |
| 19 | delete answers.langDifferent; |
| 20 | |
| 21 | return answers; |
| 22 | } |
| 23 | |
| 24 | async getQuestions(newCommandOptions = {}) { |
| 25 | const { isLangCode } = require('is-language-code'); |
nothing calls this directly
no test coverage detected