How to use the yeoman-generator.assert.equal 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 yeoman / generator-mobile / test / test-prompt.js View on Github external
it('infers default value from github.io siteUrl', function () {
      assert.equal(ghTarget.default({siteUrl: 'http://owner.github.io/repo'}),
        'owner/repo');
      assert.equal(ghTarget.default({siteUrl: 'http://owner.github.io'}),
        'owner/owner.github.io');
    });
  });
github yeoman / generator-mobile / test / test-prompt.js View on Github external
it('infers siteUrl from githubTarget', function () {
      var a = {githubTarget: 'owner/repo'};
      prompt.populateMissing(a);
      assert.equal(a.siteUrl, 'https://owner.github.io/repo');

      a = {githubTarget: 'owner/owner.github.io'};
      prompt.populateMissing(a);
      assert.equal(a.siteUrl, 'https://owner.github.io');
    });
github yeoman / generator-mobile / test / test-prompt.js View on Github external
it('infers githubBranch', function () {
      var a = {siteUrl: 'http://owner.github.io'};
      prompt.populateMissing(a);
      assert.equal(a.githubBranch, 'master');

      a = {siteUrl: 'http://owner.github.io/repo'};
      prompt.populateMissing(a);
      assert.equal(a.githubBranch, 'gh-pages');

      a = {githubTarget: 'owner/repo'};
      prompt.populateMissing(a);
      assert.equal(a.githubBranch, 'gh-pages');

      a = {githubTarget: 'owner/owner.github.io'};
      prompt.populateMissing(a);
      assert.equal(a.githubBranch, 'master');

      a = {siteUrl: 'http://www.example.org/path'};
      prompt.populateMissing(a);
      assert.equal(a.githubBranch, undefined);
    });
  });
github mgnsharon / generator-xd-angular / test / app-generator.spec.js View on Github external
it('should set the right variable names for templates', function () {
    assert.equal(appGen.generator.appName, 'xdTest');
    assert.equal(appGen.generator.projectSlug, 'xd-test');
    assert.equal(appGen.generator.appTitle, 'Xd Test');
    assert.equal(appGen.generator.controllerName, 'XdTestCtrl');
  });
github michikono / generator-angular-enterprise / test / decorator.spec.js View on Github external
.on('end', function() {
      var generatedDecoratorContent = fs.readFileSync(decoratorGen.destinationPath('client/app/app.config.js'), 'utf8');
      assert.equal(decoratorFixture, generatedDecoratorContent);
      done();
    });
  });
github michikono / generator-angular-enterprise / test / app.spec.js View on Github external
.on('end', function () {
        var generatedAppContent = fs.readFileSync(featureGen.destinationPath('client/app/app.module.js'), 'utf8');
        assert.equal(appFixture, generatedAppContent);
        done();
      });
  });
github Dica-Developer / generator-node-webkit / test / prompt-github.js View on Github external
.on('end', function () {
        var packageJson = fs.readJsonFileSync('package.json');
        assert.equal(packageJson.author.name, 'Jörg Weber', 'Should fail if author name is not "Jörg Weber"');
        assert.equal(packageJson.author.url, 'https://github.com/JayGray', 'Should fail if author url is not "https://github.com/JayGray"');
        assert.equal(packageJson.homepage, 'https://github.com/JayGray/testapp', 'Should fail if homepage is not "https://github.com/JayGray/testapp"');
        assert.equal(packageJson.bugs, 'https://github.com/JayGray/testapp/issues', 'Should fail if bugs url is not "https://github.com/JayGray/testapp"');
        done();
      });
  });
github michikono / generator-angular-enterprise / test / feature.spec.js View on Github external
.on('end', function() {
      var generatedFeatureModuleContent = fs.readFileSync(featureGen.destinationPath('client/app/my-feature/my-feature.module.js'), 'utf8');
      var generatedFeatureRouteContent = fs.readFileSync(featureGen.destinationPath('client/app/my-feature/my-feature.state.js'), 'utf8');
      assert.equal(featureModuleFixture, generatedFeatureModuleContent);
      assert.equal(featureRouteFixtureUi, generatedFeatureRouteContent);
      done();
    });
  });
github Dica-Developer / generator-node-webkit / test / prompt-github.js View on Github external
.on('end', function () {
        var packageJson = fs.readJsonFileSync('package.json');
        assert.equal(packageJson.author.name, 'Jörg Weber', 'Should fail if author name is not "Jörg Weber"');
        assert.equal(packageJson.author.url, 'https://github.com/JayGray', 'Should fail if author url is not "https://github.com/JayGray"');
        assert.equal(packageJson.homepage, 'https://github.com/JayGray/testapp', 'Should fail if homepage is not "https://github.com/JayGray/testapp"');
        assert.equal(packageJson.bugs, 'https://github.com/JayGray/testapp/issues', 'Should fail if bugs url is not "https://github.com/JayGray/testapp"');
        done();
      });
  });
github michikono / generator-angular-enterprise / test / feature.spec.js View on Github external
.on('end', function() {
      var generatedFeatureModuleContent = fs.readFileSync(featureGen.destinationPath('client/app/my-feature/my-feature.module.js'), 'utf8');
      var generatedFeatureRouteContent = fs.readFileSync(featureGen.destinationPath('client/app/my-feature/my-feature.route.js'), 'utf8');
      assert.equal(featureModuleFixture, generatedFeatureModuleContent);
      assert.equal(featureRouteFixtureNg, generatedFeatureRouteContent);
      done();
    });
  });