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

Helpers Question #124

Closed
bstopp opened this issue Sep 15, 2020 · 1 comment
Closed

Helpers Question #124

bstopp opened this issue Sep 15, 2020 · 1 comment
Labels

Comments

@bstopp
Copy link

bstopp commented Sep 15, 2020

This is a question not an issue per-se:

I'm trying to use the yeoman-test createGenerator helper method. But i get:

TypeError: console.Console is not a constructor

    at new TerminalAdapter (/work/spaces/generator-test/node_modules/yeoman-environment/lib/adapter.js:24:39)

I tried to base my logic off of the tests here:

describe('.createGenerator()', function () {
it('create a new generator', function () {
const generator = helpers.createGenerator('unicorn:app', [
[this.StubGenerator, 'unicorn:app']
]);
assert.ok(generator instanceof this.StubGenerator);
});
it('pass args params to the generator', function () {
helpers.createGenerator(
'unicorn:app',
[[this.StubGenerator, 'unicorn:app']],
['temp']
);
assert.deepEqual(this.args, ['temp']);
});
it('pass options param to the generator', function () {
helpers.createGenerator(
'unicorn:app',
[[this.StubGenerator, 'unicorn:app']],
['temp'],
{ui: 'tdd'}
);
assert.equal(this.options.ui, 'tdd');
});
});
but while that works when i run locally, my generator tests don't work.. Any thoughts?

@github-actions
Copy link
Contributor

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

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

No branches or pull requests

1 participant