Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should copy package.json with gulp packages', function() {
assert.file(['package.json']);
assert.fileContent('package.json', /.gulp-/);
assert.noFileContent('package.json', /.gulp-babel/);
});
it('should not have the tests dependencies', function () {
assert.noFileContent('package.json', 'mocha');
assert.noFileContent('package.json', 'karma');
assert.noFileContent('package.json', 'phantomjs');
assert.noFileContent('package.json', 'jasmine');
assert.noFileContent('package.json', 'protractor');
assert.noFileContent('package.json', 'should');
assert.noFileContent('package.json', 'supertest');
assert.noFileContent('package.json', 'jscs');
assert.noFileContent('package.json', 'jshint');
});
assert.fileContent('package.json', /grunt-contrib-jshint/);
assert.noFileContent('package.json', /grunt-karma/);
assert.noFileContent('package.json', /karma-ng-html2js-preprocessor/);
assert.noFileContent('package.json', /karma-chrome-launcher/);
assert.noFileContent('package.json', /karma-firefox-launcher/);
assert.noFileContent('package.json', /karma-jasmine/);
assert.noFileContent('package.json', /karma-phantomjs-launcher/);
assert.noFileContent('package.json', /karma/);
assert.noFileContent('package.json', /karma-coverage/);
assert.noFileContent('package.json', /karma-ng-scenario/);
assert.noFileContent('package.json', /grunt-rev/);
assert.noFileContent('package.json', /grunt-contrib-sass/);
assert.noFileContent('package.json', /grunt-contrib-less/);
assert.noFileContent('package.json', /grunt-contrib-csslint/);
assert.noFileContent('package.json', /grunt-contrib-imagemin/);
assert.noFileContent('package.json', /grunt-plato/);
done();
});
});
bangDirective.run(function () {
assert.file('client/directives/map/map.directive.js');
assert.file('client/directives/map/map.spec.js');
assert.fileContent('client/directives/map/map.directive.js', '.directive(\'map\', function () {');
assert.noFileContent('client/directives/map/map.directive.js', 'templateUrl');
assert.fileContent('client/directives/map/map.spec.js', 'angular.element(\'<map></map>\');');
done();
});
});
assert.fileContent('package.json', /grunt-contrib-copy/);
assert.fileContent('package.json', /grunt-contrib-jshint/);
assert.noFileContent('package.json', /grunt-karma/);
assert.noFileContent('package.json', /karma-ng-html2js-preprocessor/);
assert.noFileContent('package.json', /karma-chrome-launcher/);
assert.noFileContent('package.json', /karma-firefox-launcher/);
assert.noFileContent('package.json', /karma-jasmine/);
assert.noFileContent('package.json', /karma-phantomjs-launcher/);
assert.noFileContent('package.json', /karma/);
assert.noFileContent('package.json', /karma-coverage/);
assert.noFileContent('package.json', /karma-ng-scenario/);
assert.noFileContent('package.json', /grunt-rev/);
assert.noFileContent('package.json', /grunt-contrib-sass/);
assert.noFileContent('package.json', /grunt-contrib-less/);
assert.noFileContent('package.json', /grunt-contrib-csslint/);
assert.noFileContent('package.json', /grunt-contrib-imagemin/);
assert.noFileContent('package.json', /grunt-plato/);
done();
});
});
assert.fileContent('package.json', /"name": "my-app"/);
assert.fileContent('package.json', /"version": "0\.0\.1"/);
assert.fileContent('package.json', /grunt-usemin/);
assert.fileContent('package.json', /grunt-ng-annotate/);
assert.fileContent('package.json', /grunt-contrib-clean/);
assert.fileContent('package.json', /grunt-contrib-concat/);
assert.fileContent('package.json', /grunt-contrib-uglify/);
assert.fileContent('package.json', /grunt-contrib-cssmin/);
assert.fileContent('package.json', /grunt-contrib-watch/);
assert.fileContent('package.json', /grunt-bower-task/);
assert.fileContent('package.json', /grunt-contrib-copy/);
assert.fileContent('package.json', /grunt-contrib-jshint/);
assert.noFileContent('package.json', /grunt-karma/);
assert.noFileContent('package.json', /karma-ng-html2js-preprocessor/);
assert.noFileContent('package.json', /karma-chrome-launcher/);
assert.noFileContent('package.json', /karma-firefox-launcher/);
assert.noFileContent('package.json', /karma-jasmine/);
assert.noFileContent('package.json', /karma-phantomjs-launcher/);
assert.noFileContent('package.json', /karma/);
assert.noFileContent('package.json', /karma-coverage/);
assert.noFileContent('package.json', /karma-ng-scenario/);
assert.noFileContent('package.json', /grunt-rev/);
assert.noFileContent('package.json', /grunt-contrib-sass/);
assert.noFileContent('package.json', /grunt-contrib-less/);
assert.noFileContent('package.json', /grunt-contrib-csslint/);
assert.noFileContent('package.json', /grunt-contrib-imagemin/);
assert.noFileContent('package.json', /grunt-plato/);
done();
assert.fileContent('package.json', /grunt-contrib-jshint/);
assert.fileContent('package.json', /grunt-rev/);
assert.fileContent('package.json', /grunt-contrib-sass/);
assert.fileContent('package.json', /grunt-contrib-csslint/);
assert.fileContent('package.json', /grunt-contrib-imagemin/);
assert.fileContent('package.json', /grunt-plato/);
assert.noFileContent('package.json', /grunt-karma/);
assert.noFileContent('package.json', /karma-ng-html2js-preprocessor/);
assert.noFileContent('package.json', /karma-chrome-launcher/);
assert.noFileContent('package.json', /karma-firefox-launcher/);
assert.noFileContent('package.json', /karma-jasmine/);
assert.noFileContent('package.json', /karma-phantomjs-launcher/);
assert.noFileContent('package.json', /karma/);
assert.noFileContent('package.json', /karma-coverage/);
assert.noFileContent('package.json', /karma-ng-scenario/);
assert.noFileContent('package.json', /grunt-contrib-less/);
done();
});
});
gen.onEnd(function() {
assert.fileContent('bower.json', /angular/);
assert.noFileContent('bower.json', /angular-mocks: "2\.0\.0"/);
assert.noFileContent('bower.json', /"angular": "2\.0\.0"/);
assert.noFileContent('bower.json', /"angular-i18n": "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-touch: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-sanitize: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-resource: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-animate: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-cookies: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-route: "2\.0\.0"/);
assert.noFileContent('bower.json', /"angular-ui-router"/);
assert.noFileContent('bower.json', /"angular-translate"/);
assert.noFileContent('bower.json', /"angular-snap"/);
assert.noFileContent('bower.json', /"revolunet-angular-carousel"/);
assert.noFileContent('bower.json', /"angular-bindonce"/);
done();
});
});
gen.onEnd(function() {
assert.fileContent('bower.json', /"angular": "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-mocks: "2\.0\.0"/);
assert.noFileContent('bower.json', /"angular-i18n": "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-touch: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-sanitize: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-resource: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-animate: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-cookies: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-route: "2\.0\.0"/);
assert.noFileContent('bower.json', /"angular-ui-router"/);
assert.noFileContent('bower.json', /"angular-translate"/);
assert.noFileContent('bower.json', /"angular-snap"/);
assert.noFileContent('bower.json', /"revolunet-angular-carousel"/);
assert.noFileContent('bower.json', /"angular-bindonce"/);
done();
});
});
gen.onEnd(function() {
assert.fileContent('bower.json', /"angular": "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-mocks: "2\.0\.0"/);
assert.noFileContent('bower.json', /"angular-i18n": "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-touch: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-sanitize: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-resource: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-animate: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-cookies: "2\.0\.0"/);
assert.noFileContent('bower.json', /angular-route: "2\.0\.0"/);
assert.noFileContent('bower.json', /"angular-ui-router"/);
assert.noFileContent('bower.json', /"angular-translate"/);
assert.noFileContent('bower.json', /"angular-snap"/);
assert.noFileContent('bower.json', /"revolunet-angular-carousel"/);
assert.noFileContent('bower.json', /"angular-bindonce"/);
done();
});
});