How to use the yeoman-generator.assert 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 Skookum / generator-genreact / test / test-integration.js View on Github external
exec('node ' + tmpPath + '/scripts/suit-conformance', function(err, stdout, stderr) {
      if (err) {
        console.log(err);
        assert(false, 'Suit Conformance errors found.');
      }

      if (stdout) {
        assert(!/warning/.test(stdout), stdout);
      }

      if (stderr) {
        console.error(stderr);
        assert(false, 'Suit Conformance errors found.');
      }
      done();
    });
  }));
github Swiip / generator-gulp-angular / test / test-import-gen.js View on Github external
it('can be imported without blowing up', function () {
    assert(require('../app') !== undefined);
  });
});
github diegonetto / generator-ionic / test / test-load.js View on Github external
it('can be imported without blowing up', function () {
      assert(require('../app') !== undefined);
    });
});
github PatrickWolleb / generator-koa-rest / test / test-resource.js View on Github external
it('replaces {{RESOURCE_NAME}} in spec file with promped value', function () {
      var rootController = fs.readFileSync(path.join(os.tmpdir(), './temp-test') + '/src/resources/test_resource_name/test_resource_name.spec.js', 'utf-8');
      assert(rootController.indexOf('test_resource_name') !== -1, true);
  });
github yeoman / generator-mobile / test / test-prompt.js View on Github external
it('recognizes GitHub domain', function () {
    assert(prompt.isGitHub('http://example.github.io'), 'http://example.github.io');
    assert(prompt.isGitHub('https://example.github.io'), 'https://example.github.io');
    assert(prompt.isGitHub('http://owner.github.io/project'), 'http://owner.github.io/project');
    assert(!prompt.isGitHub('http://www.example.org'), 'http://www.example.org');
  });
github yeoman / generator-mobile / test / test-prompt.js View on Github external
it('recognizes GitHub domain', function () {
    assert(prompt.isGitHub('http://example.github.io'), 'http://example.github.io');
    assert(prompt.isGitHub('https://example.github.io'), 'https://example.github.io');
    assert(prompt.isGitHub('http://owner.github.io/project'), 'http://owner.github.io/project');
    assert(!prompt.isGitHub('http://www.example.org'), 'http://www.example.org');
  });
github PatrickWolleb / generator-koa-rest / test / test-app.js View on Github external
it('replaces {{API_NAME}} and {{API_PORTAL}} on root controller file with promped values', function () {
      var rootController = fs.readFileSync(path.join(os.tmpdir(), './temp-test') + '/src/resources/root/root.controller.js', 'utf-8');
      assert(rootController.indexOf('Test API TEST') !== -1, true);
      assert(rootController.indexOf('http://dev.api.com') !== -1, true);
  });
});
github yeoman / generator-mobile / test / test-prompt.js View on Github external
it('recognizes GitHub domain', function () {
    assert(prompt.isGitHub('http://example.github.io'), 'http://example.github.io');
    assert(prompt.isGitHub('https://example.github.io'), 'https://example.github.io');
    assert(prompt.isGitHub('http://owner.github.io/project'), 'http://owner.github.io/project');
    assert(!prompt.isGitHub('http://www.example.org'), 'http://www.example.org');
  });
github yeoman / generator-mobile / test / test-download.js View on Github external
download({}, function (err, d, url, ver) {
      assert(!err, err);
      assert.deepEqual(ver, {tag_name: 'v2.5.2'});
      assert.equal(url, download.WSK_ZIP_URL + 'v2.5.2.zip');
      assert(d);

      if (!scope.isDone()) {
        assert.fail('pending mocks: ' + scope.pendingMocks());
      }

      done();
    });
  });
github yeoman / generator-mobile / test / test-download.js View on Github external
download({}, function (err) {
      assert(err);
      assert.equal(err.toString(), 'Error: bad request');
      done();
    });
  });