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

prompt.errors is not attached to the TestAdapter prompt anymore #870

Closed
thaiat opened this issue Nov 11, 2015 · 1 comment
Closed

prompt.errors is not attached to the TestAdapter prompt anymore #870

thaiat opened this issue Nov 11, 2015 · 1 comment

Comments

@thaiat
Copy link
Contributor

thaiat commented Nov 11, 2015

Hi,

i'm (finally) upgrading my generator to latest version of yeoman-generator.
I have an issue in my unit tests, as it seems you do not any more attach errors prompt on the prompt object.

I was doing somehting like this:

    it('with empty constantname should throw an error', function(done) {
            this.runGen
                .withPrompts({
                    modulename: modulename,
                    constantname: ''
                })
                .on('error', function(error) {
                    console.log(error);
                })
                .on('end', function() {
                     assert(_.isEqual(this.runGen.generator.prompt.errors, [{
                        name: 'constantname',
                        message: 'Please enter a non empty name'
                    }]));
                    done();
                }.bind(this));
        });

which does not work anymore as prompt.errors is empty...

is there a workaround ?

cheers

@SBoudrias SBoudrias changed the title Upgrade from 0.17.7 issues prompt.errors is not attached to the TestAdapter prompt anymore Nov 30, 2015
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2020

This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 5 days

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

No branches or pull requests

2 participants