How to use the yeoman-generator.test.createGenerator 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 eddiemoore / generator-smarttv / test / test-creation.js View on Github external
it('should generate a new scene', function(done) {
        var name = 'foo';
        var deps = [path.join('../../', 'scene')];
        var smarttvGenerator = helpers.createGenerator('smarttv:scene', deps, [name]);

        helpers.mockPrompt(this.app, {
            features: ['includeCompass'],
            apptype: 'Video'
        });

        this.app.options['skip-install'] = true;
        this.app.run({}, function() {
            smarttvGenerator.run({}, function() {
                helpers.assertFiles([
                    'src/app/scenes/Foo.js',
                    'src/app/htmls/Foo.html',
                    'src/app/stylesheets/Foo.css',
                ]);
                done();
            });
github passy / generator-heroku / test / test-creation.js View on Github external
helpers.testDirectory(this.tmpDir, function (err) {
      if (err) {
        return done(err);
      }

      fs.writeFileSync(path.join(this.tmpDir, 'package.json'), JSON.stringify({
        name: 'testproj',
        version: '1.3.7'
      }));

      this.app = helpers.createGenerator('heroku:app', [
        '../../app'
      ]);
      done();
    }.bind(this));
  });
github Dica-Developer / generator-node-webkit / test / grunt-tasks.js View on Github external
beforeEach(function () {
      gen = helpers.createGenerator('node-webkit:app', deps, [], {
        'skip-install': true,
        'skip-welcome': true
      });
      helpers.mockPrompt(gen, defaultOptions);
    });
github nDmitry / generator-frontend / test / test-sass.js View on Github external
helpers.testDirectory(path.join(__dirname, 'temp'), function(err) {
            if (err) {
                return done(err);
            }

            this.app = helpers.createGenerator('frontend:sass', [
                '../../sass'
            ]);

            this.app.options['skip-install'] = true;

            done();
        }.bind(this));
    });
github mazerte / generator-footguard / test / test-view.js View on Github external
helpers.testDirectory(path.join(__dirname, './.tmp'), function (err) {
      if (err) {
        return done(err);
      }
      this.footguard = {};
      this.footguard.app = helpers.createGenerator('footguard:app', [
        '../../app'
      ]);

      this.footguard.app.options['skip-install'] = true;

      this.footguard.app.run({}, function() {
        done();
      });
    }.bind(this));
  });
github react-webpack-generators / generator-react-webpack / test / test-creation.js View on Github external
react.run({}, function() {
        var generator =
          helpers.createGenerator(
            'react-webpack:store',
            [path.join('../../store')],
            ['Test'],
            { appPath: 'src' }
          );

        react.run([], function() {
          generator.run([], function() {
            done();
          });
        });
      });
    });
github michikono / generator-angular-enterprise / test / factory.spec.js View on Github external
baseGenerator(function() {
      factoryGen = helpers.createGenerator('angular-enterprise:factory', [path.join(__dirname, '../generators/factory')], ['myFactory']);
      done();
    });
  });
github snphq / generator-sp / test / test-creation.js View on Github external
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
            if (err) {
                return done(err);
            }

            this.app = helpers.createGenerator('sp:app', [
                '../../app'
            ]);
            done();
        }.bind(this));
    });
github larsonjj / generator-yeogurt / test / test-creation.js View on Github external
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
            if (err) {
                return done(err);
            }

            this.app = helpers.createGenerator('yeogurt:app', [
                '../../app'
            ]);
            done();
        }.bind(this));
    });