How to use the yeoman-test.registerDependencies function in yeoman-test

To help you get started, we’ve selected a few yeoman-test examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / yeoman-test / yeoman-test-tests.ts View on Github external
helpers.mockLocalConfig(generator, {foo: 'bar'});

// helpers.createDummyGenerator()
const dummyGenerator = helpers.createDummyGenerator();

// helpers.createGenerator()
const angularGenerator = helpers.createGenerator('angular:app', [
	'../../app',
	'../../common',
	'../../controller',
	'../../main',
	[helpers.createDummyGenerator(), 'testacular:app']
]);

// helpers.registerDependencies()
helpers.registerDependencies(env, ['dependency']);

// helpers.run()
helpers.run(path.join(__dirname, '../app'))
	.withOptions({foo: 'bar'})
	.withArguments(['name-x'])
	.withPrompts({coffee: false});

helpers.run(path.join(__dirname, '../app'))
	.inTmpDir(dir => { /* ... */ })
	.withPrompts({coffee: false})
	.then(() => { /* ... */ });

helpers.run(path.join(__dirname, '../app')).withGenerators([
	[helpers.createDummyGenerator(), 'karma:app'],
]);