Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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();
});
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();
});
});
// 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();
});
});
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();
});
});
// 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();
});
});
// 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();
});
});
it('Use temp-test as destinationRoot', function () {
assert.ok(process.cwd().match(/temp-test/));
});
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));
});
.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();
});
react.run({}, function() {
assert.ok(react.config.get('styles-language'));
done();
});
});