Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent usage of options and prompts #151

Closed
binduwavell opened this issue Mar 22, 2016 · 1 comment · Fixed by #152
Closed

inconsistent usage of options and prompts #151

binduwavell opened this issue Mar 22, 2016 · 1 comment · Fixed by #152

Comments

@binduwavell
Copy link
Contributor

Prompt includes a item named 'someOption' which is confusing because of the distinction between options and prompts. Especially in testing...

    var prompts = [{
      type: 'confirm',
      name: 'someOption',
      when: function(props) {
        console.log("WHEN: " + JSON.stringify(props));
        return true;
      },
      message: 'Would you like to enable this option?',
      default: true
    }];

In the test we pass someOption as an option and someAnswer as a prompt. There is no option named someOption and no prompt named someAnswer...

  before(function (done) {
    helpers.run(path.join(__dirname, '../generators/app'))
      .withOptions({someOption: true})
      .withPrompts({someAnswer: true})
      .on('end', done);
  });
@SBoudrias
Copy link
Member

PR welcomed to fix that issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants