Latest release broke package
christian-bromann opened this issue · 1 comments
christian-bromann commented
Hey,
just some hours ago I used inquirer with WebdriverIO successfully, now it broke and some investigations seem that it has to do with the recent release. Adding a console.log to base.js
:
export default class Prompt {
constructor(question, rl, answers) {
console.log('Prompt', question);
Prints out the following:
Prompt {
type: 'checkbox',
name: 'plugins',
message: 'Do you want to add a plugin to your test setup?',
choices: [
{ name: 'wait-for', value: 'wdio-wait-for$--$wait-for' },
{
name: 'angular-component-harnesses',
value: '@badisi/wdio-harness$--$harness'
}
],
default: []
}
? Do you want to add a plugin to your test setup?
Prompt {
type: 'checkbox',
name: 'services',
message: 'Do you want to add a service to your test setup?',
choices: Array {},
default: []
}
It seems like my choices array got converted to Array {}
which then causes the following error:
TypeError: this.opt.choices.getChoice is not a function
at CheckboxPrompt.render (file:///private/tmp/fixme/node_modules/inquirer/lib/prompts/checkbox.js:108:26)
at CheckboxPrompt._run (file:///private/tmp/fixme/node_modules/inquirer/lib/prompts/checkbox.js:73:
christian-bromann commented
Nevermind, this was an error on my end. Sorry for the noise.