How to use the yeoman-generator.test.run function in yeoman-generator

To help you get started, we’ve selected a few yeoman-generator 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 ironSource / node-generator-bare-react / test / util / runner.js View on Github external
function start() {
      const ctx = helpers.run(path)
          , end = (err) => { ctx._run = noop, next(), done(err, ctx) }

      // Shorthands
      if (options) ctx.withOptions(options)
      if (prompts) ctx.withPrompts(prompts)
      if (args) ctx.withArguments(args)
      if (config) ctx.withLocalConfig(config)
      if (generators) ctx.withGenerators(generators)

      ctx.on('end', end).on('error', end)

      // Add error handling to async(): abort on error
      const async = ctx.async.bind(ctx)

      ctx.async = () => {
        let done = async()
github Accenture / generator-mario / test / test-router.js View on Github external
before(function(done) {
      stub = sinon.stub(existTest, 'verifyPath', function() {
        return true;
      });
      helpers.run(path.join(__dirname, '../generators/router'))
        .inDir(path.join(os.tmpdir(), './temp_test'))
        .withArguments(['some_feature'])
        .withOptions({
          directory: 'some_feature',
          controller: 'some_controller'
        })
        .on('end', done);
    });
    it('creates files', function() {
github jadjoubran / laravel5-generator / test / test-app.js View on Github external
before(function (done) {
    helpers.run(path.join(__dirname, '../app'))
      .withOptions({ skipInstall: true })
      .withPrompts({ someOption: true })
      .on('end', done);
  });
github Dica-Developer / generator-node-webkit / test / prompt-github.js View on Github external
beforeEach(function () {
    app = helpers.run(path.join(__dirname, '../app'))
      .inDir(path.join(__dirname, './tmp'))
      .withOptions({ 'skip-install': true, 'skip-welcome-message': true })
      .withGenerators(deps);
  });
github lauterry / generator-ngtailor / test / test-mode-advanced-default.js View on Github external
beforeEach(function (done) {

		gen = helpers.run(path.join( __dirname, '../app'))
			.inDir(path.join( __dirname, 'temp/advanced-default'))
			.withOptions({'skip-install' : true})
			.withArguments([])
			.withPrompt({
				'mode': 'Advanced',
				'name' : "MyApp",
				'angular_version' : '2.0.0',
				'version' : '0.0.1',
				'description' : 'A Great App',
				'csslint' : false,
				'complexity' : false,
				'test' : false,
				'revision' : false,
				'gitignore' : false,
				'i18n' : false,
				'csspreprocessor' : 'none',
github deebloo / generator-angular-blueprint / test / blueprint-style.spec.js View on Github external
before(function (done) {
    helpers.run(path.join(__dirname, '../generators/blueprint'))
      .withArguments(['style'])
      .withOptions({ 'skip-install': true })
      .on('end', done);
  });
github silvenon / generator-wbp / test / styles.js View on Github external
before((done) => {
    helpers.run(path.join(__dirname, '../generators/app'))
      .withOptions({skipInstall: true})
      .on('end', done);
  });
github Accenture / generator-mario / test / test-compositeview.js View on Github external
before(function(done) {
      stub = sinon.stub(existTest, 'verifyPath', function() {
        return true;
      });
      helpers.run(path.join(__dirname, '../generators/compositeview'))
        .withArguments(['apples'])
        .inTmpDir(function(dir) {
          var done = this.async();
          var filePath = path.join(dir, 'app/scripts/apps/template', 'feature_template.hbs');
          fs.ensureFile(filePath, done);
        })
        .withOptions({
          directory: 'fruit',
          itemview: 'apple',
          template: 'template/feature_template.hbs'
        })
        .withLocalConfig({ preferences: {ecma: 6 }})
        .on('end', done);
    });
github NovaeWorkshop / Nova / test / app.js View on Github external
before(function (done) {

      this.timeout(240000);
      var dir;

      helpers.run(path.join(__dirname, '../app'))
        .inDir(path.join(__dirname, './mock'), function (d) {
          dir = d;
          var cb = this.async();
          exec('cp ' + path.join(__dirname, '/files/.yo-rc.json') + ' ' + dir, function () {
            cb();
          });
        })
        .withPrompt({
          name: 'Test',
          backend: 'mongo',
          modules: [],
          sockets: true,
          auth: true,
          tests: ['e2e', 'karma', 'mocha', 'control']
        })
        .on('end', function () {
github lauterry / generator-ngtailor / test / test-mode-advanced-custom-third-modules.js View on Github external
beforeEach(function (done) {

		gen = helpers.run(path.join( __dirname, '../app'))
			.inDir(path.join( __dirname, 'temp/advanced-custom-third-module'))
			.withOptions({'skip-install' : true})
			.withArguments([])
			.withPrompt({
				'mode': 'Advanced',
				'name' : "MyApp",
				'angular_version' : '2.0.0',
				'version' : '0.0.1',
				'description' : 'A Great App',
				'csslint' : true,
				'complexity' : true,
				'test' : false,
				'revision' : true,
				'gitignore' : true,
				'i18n' : true,
				'csspreprocessor' : 'less',