How to use the yeoman-generator.assert.ok 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 vincentmac / generator-browserify / test / test-creation.js View on Github external
this.app.run({}, function () {
            assert.file(expected);

            // read bower.json
            var bowerJson = fs.readFileSync('bower.json', 'utf8');
            var bowerDeps = JSON.parse(bowerJson).dependencies;

            assert.ok(bowerDeps.foundation);
            assert.ok(bowerDeps.modernizr);

            // read package.json
            var packageJson = fs.readFileSync('package.json', 'utf8');
            var packageDeps = JSON.parse(packageJson).dependencies;
            var packageDevDeps = JSON.parse(packageJson).devDependencies;

            assert.ok(packageDeps.backbone);
            assert.ok(packageDeps.jquery);
            assert.ok(packageDeps.lodash);
            assert.ok(!packageDevDeps.grunt);
            assert.ok(packageDevDeps.gulp);
            assert.ok(packageDevDeps['browserify-jade']);

            done();
        });
github vincentmac / generator-browserify / test / test-creation.js View on Github external
this.app.run({}, function () {
            assert.file(expected);

            // read bower.json Files
            var bowerJson = fs.readFileSync('bower.json', 'utf8');
            var bowerDeps = JSON.parse(bowerJson).dependencies;

            assert.ok(bowerDeps.bootstrap);
            assert.ok(bowerDeps.modernizr);

            // read package.json
            var packageJson = fs.readFileSync('package.json', 'utf8');
            var packageDeps = JSON.parse(packageJson).dependencies;
            var packageDevDeps = JSON.parse(packageJson).devDependencies;

            assert.ok(packageDeps.backbone);
            assert.ok(packageDeps.jquery);
            assert.ok(packageDeps.lodash);
            assert.ok(packageDevDeps.grunt);
            assert.ok(packageDevDeps['browserify-jade']);

            done();
        });
    });
github vincentmac / generator-browserify / test / test-creation.js View on Github external
// read bower.json
            var bowerJson = fs.readFileSync('bower.json', 'utf8');
            var bowerDeps = JSON.parse(bowerJson).dependencies;

            assert.ok(bowerDeps.foundation);
            assert.ok(bowerDeps.modernizr);

            // read package.json
            var packageJson = fs.readFileSync('package.json', 'utf8');
            var packageDeps = JSON.parse(packageJson).dependencies;
            var packageDevDeps = JSON.parse(packageJson).devDependencies;

            assert.ok(packageDeps.backbone);
            assert.ok(packageDeps.jquery);
            assert.ok(packageDeps.lodash);
            assert.ok(!packageDevDeps.grunt);
            assert.ok(packageDevDeps.gulp);
            assert.ok(packageDevDeps['browserify-jade']);

            done();
        });
    });
github vincentmac / generator-browserify / test / test-creation.js View on Github external
this.app.run({}, function () {
            assert.file(expected);

            // read bower.json Files
            var bowerJson = fs.readFileSync('bower.json', 'utf8');
            var bowerDeps = JSON.parse(bowerJson).dependencies;

            assert.ok(bowerDeps.foundation);
            assert.ok(bowerDeps.modernizr);

            // read package.json
            var packageJson = fs.readFileSync('package.json', 'utf8');
            var packageDeps = JSON.parse(packageJson).dependencies;
            var packageDevDeps = JSON.parse(packageJson).devDependencies;

            assert.ok(packageDeps.backbone);
            assert.ok(packageDeps.jquery);
            assert.ok(packageDeps.lodash);
            assert.ok(packageDevDeps.grunt);
            assert.ok(packageDevDeps['browserify-jade']);

            done();
        });
    });
github vincentmac / generator-browserify / test / test-creation.js View on Github external
// read bower.json Files
            var bowerJson = fs.readFileSync('bower.json', 'utf8');
            var bowerDeps = JSON.parse(bowerJson).dependencies;

            assert.ok(bowerDeps.foundation);
            assert.ok(bowerDeps.modernizr);

            // read package.json
            var packageJson = fs.readFileSync('package.json', 'utf8');
            var packageDeps = JSON.parse(packageJson).dependencies;
            var packageDevDeps = JSON.parse(packageJson).devDependencies;

            assert.ok(packageDeps.backbone);
            assert.ok(packageDeps.jquery);
            assert.ok(packageDeps.lodash);
            assert.ok(packageDevDeps.grunt);
            assert.ok(!packageDevDeps['browserify-jade']);

            done();
        });
    });
github vincentmac / generator-browserify / test / test-creation.js View on Github external
// read bower.json Files
            var bowerJson = fs.readFileSync('bower.json', 'utf8');
            var bowerDeps = JSON.parse(bowerJson).dependencies;

            assert.ok(bowerDeps.bootstrap);
            assert.ok(bowerDeps.modernizr);

            // read package.json
            var packageJson = fs.readFileSync('package.json', 'utf8');
            var packageDeps = JSON.parse(packageJson).dependencies;
            var packageDevDeps = JSON.parse(packageJson).devDependencies;

            assert.ok(packageDeps.backbone);
            assert.ok(packageDeps.jquery);
            assert.ok(packageDeps.lodash);
            assert.ok(packageDevDeps.grunt);
            assert.ok(packageDevDeps['browserify-jade']);

            done();
        });
    });
github taiansu / generator-rf / test / test-app.js View on Github external
it('Use temp-test as destinationRoot', function () {
      assert.ok(process.cwd().match(/temp-test/));
    });
github videojs / generator-videojs-plugin / test / test-app.js View on Github external
it('sets basic package properties', function() {
      assert.strictEqual(this.pkg.author, 'John Doe');
      assert.strictEqual(this.pkg.license, 'MIT');
      assert.strictEqual(this.pkg.name, 'videojs-wat');
      assert.strictEqual(this.pkg.version, '0.0.0');
      assert.strictEqual(this.pkg.main, 'es5/plugin.js');
      assert.ok(_.isArray(this.pkg.keywords));
      assert.ok(_.isPlainObject(this.pkg['browserify-shim']));
      assert.ok(_.isPlainObject(this.pkg.standard));
      assert.ok(_.isPlainObject(this.pkg.devDependencies));
    });
github Dica-Developer / generator-node-webkit / test / prompt-github.js View on Github external
.on('end', function () {
        assert.ok(typeof app.generator.prompt.errors === 'undefined', 'This should fail if the app name contains a space.');
        assert.ok(app.generator.github, 'This should fail if app.github is set to false.');
        assert.ok(app.generator.githubUser === 'JayGray', 'This should fail if app.githubUser is not "JayGray".');
        assert.ok(app.generator.realname === 'Jörg Weber', 'This should fail if the app.realname is not "Jörg Weber".');
        assert.ok(app.generator.githubUrl === 'https://github.com/JayGray', 'This should fail if the app.githubUrl is not "https://github.com/JayGray".');
        done();
      });
github react-webpack-generators / generator-react-webpack / test / test-creation.js View on Github external
react.run({}, function() {
        assert.ok(react.config.get('styles-language'));
        done();
      });
    });