Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('save skipBootstrap to configs', function () {
assert.fileContent('.yo-rc.json', /"withBootstrap": false/);
});
it('test contains AMD path', function() {
assert.fileContent('test/apps/apples/apples_composite_view_test.js', /apples_composite_view/);
});
it('test contains compositeview class', function() {
it('contains task configuration', function() {
assert.fileContent('grunt-tasks/config/styles.js', /grunt\.config\('less'/);
assert.fileContent('grunt-tasks/config/styles.js', /\/styles\/main\.less/);
assert.fileContent('grunt-tasks/config/watch.js', /\.less/);
assert.fileContent('grunt-tasks/register/styles.js', /less/);
});
it('test with right content ', function() {
assert.fileContent('app/scripts/apps/apples/apples_composite_view_test.js', /.\/apples_composite_view/);
assert.fileContent('app/scripts/apps/apples/apples_composite_view_test.js', /, ApplesCompositeView/);
assert.fileContent('app/scripts/apps/apples/apples_composite_view_test.js', /new ApplesCompositeView/);
});
it('test contains Mocha syntax', function() {
it('should have mongo connect', function () {
assert.fileContent('server/server.js', 'mongoose.connect(config.mongo.uri, config.mongo.options);');
});
it('should check the package tests dependencies', function () {
assert.fileContent('package.json', 'mocha');
assert.fileContent('package.json', 'karma');
assert.fileContent('package.json', 'phantomjs');
assert.fileContent('package.json', 'jasmine');
assert.fileContent('package.json', 'protractor');
assert.fileContent('package.json', 'should');
assert.fileContent('package.json', 'supertest');
assert.fileContent('package.json', 'jscs');
assert.fileContent('package.json', 'jshint');
});
it('save configs of bootstrap', function () {
assert.fileContent('.yo-rc.json', /"withBootstrap": true/);
});
gen.onEnd(function() {
assert.fileContent('Gruntfile.js', /availabletasks/);
assert.fileContent('Gruntfile.js', /wiredep/);
assert.fileContent('Gruntfile.js', /clean/);
assert.fileContent('Gruntfile.js', /copy/);
assert.fileContent('Gruntfile.js', /ngAnnotate/);
assert.fileContent('Gruntfile.js', /useminPrepare/);
assert.fileContent('Gruntfile.js', /usemin/);
assert.fileContent('Gruntfile.js', /browserSync/);
assert.fileContent('Gruntfile.js', /jshint/);
assert.fileContent('Gruntfile.js', /watch/);
assert.fileContent('Gruntfile.js', /rev/);
assert.fileContent('Gruntfile.js', /csslint/);
assert.fileContent('Gruntfile.js', /plato/);
assert.fileContent('Gruntfile.js', /less/);
assert.fileContent('Gruntfile.js', /imagemin/);
assert.fileContent('Gruntfile.js', /htmlmin/);
assert.noFileContent('Gruntfile.js', /karma/);
assert.noFileContent('Gruntfile.js', /sass/);
assert.fileContent('Gruntfile.js', /grunt\.registerTask\('report', \[\s+'plato',\s+ 'connect:plato'\s+\]\)/);
assert.fileContent('Gruntfile.js', /grunt\.registerTask\('dev', \[\s+'less',\s+'browserSync',\s+'watch'\s+\]\)/);
assert.fileContent('Gruntfile.js', /grunt\.registerTask\('package', \[\s+'jshint',\s+'clean',\s+'useminPrepare',\s+'copy',\s+'concat',\s+'ngAnnotate',\s+'uglify',\s+'less',\s+'cssmin',\s+'rev',\s+'imagemin',\s+'usemin',\s+'htmlmin'\s+\]\)/);
assert.fileContent('Gruntfile.js', /grunt\.registerTask\('ci', \[\s+'package',\s+'plato'\s+\]\)/);
assert.fileContent('Gruntfile.js', /grunt\.registerTask\('ls', \['availabletasks'\]\)/);
assert.fileContent('Gruntfile.js', /useminPrepare/);
assert.fileContent('Gruntfile.js', /usemin/);
assert.fileContent('Gruntfile.js', /browserSync/);
assert.fileContent('Gruntfile.js', /jshint/);
assert.fileContent('Gruntfile.js', /watch/);
assert.fileContent('Gruntfile.js', /rev/);
assert.fileContent('Gruntfile.js', /csslint/);
assert.fileContent('Gruntfile.js', /plato/);
assert.fileContent('Gruntfile.js', /less/);
assert.fileContent('Gruntfile.js', /imagemin/);
assert.fileContent('Gruntfile.js', /htmlmin/);
assert.noFileContent('Gruntfile.js', /karma/);
assert.noFileContent('Gruntfile.js', /sass/);
assert.fileContent('Gruntfile.js', /grunt\.registerTask\('report', \[\s+'plato',\s+'connect:plato'\s+\]\)/);
assert.fileContent('Gruntfile.js', /grunt\.registerTask\('dev', \[\s+'less',\s+'browserSync',\s+'watch'\s+\]\)/);
assert.fileContent('Gruntfile.js', /grunt\.registerTask\('package', \[\s+'jshint',\s+'clean',\s+'useminPrepare',\s+'copy',\s+'concat',\s+'ngAnnotate',\s+'uglify',\s+'less',\s+'cssmin',\s+'rev',\s+'imagemin',\s+'usemin',\s+'htmlmin'\s+\]\)/);
assert.fileContent('Gruntfile.js', /grunt\.registerTask\('ci', \[\s+'package',\s+'plato'\s+\]\)/);
assert.fileContent('Gruntfile.js', /grunt\.registerTask\('ls', \['availabletasks'\]\)/);
done();
});
});
.on('end', function() {
assert.file('package.json');
assert.fileContent('package.json', /babel-preset-stage-0/);
assert.fileContent('package.json', /babel-preset-stage-0/);
assert.fileContent('package.json', /babel-plugin-transform-strict-mode/);
assert.fileContent('package.json', /babel-plugin-transform-object-assign/);
done();
});
});