From 8fd55c34c6d81c542ba27071bd14150092409eb3 Mon Sep 17 00:00:00 2001 From: Georgios Kalpakas Date: Tue, 12 Apr 2016 10:53:04 +0300 Subject: [PATCH] chore: update several config files (e.g. for jshint, Travis, Karma, Protractor) This brings the config files on par with the tutorial (see angular/angular-phonecat#326). It also updates the version of Node used on Travis to `4.4`. Related to #329. --- .jshintrc | 23 +++++++++++++++++------ .travis.yml | 2 +- e2e-tests/protractor.conf.js | 3 +++ karma.conf.js | 35 ++++++++++++++++++----------------- 4 files changed, 39 insertions(+), 24 deletions(-) diff --git a/.jshintrc b/.jshintrc index 6f00218e37..60f49fd369 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,13 +1,24 @@ { - "globalstrict": true, + "strict": "global", "globals": { + // Angular "angular": false, + + // Angular mocks + "module": false, + "inject": false, + + // Jasmine + "jasmine": false, "describe": false, - "it": false, - "expect": false, "beforeEach": false, "afterEach": false, - "module": false, - "inject": false + "it": false, + "expect": false, + + // Protractor + "browser": false, + "element": false, + "by": false } -} \ No newline at end of file +} diff --git a/.travis.yml b/.travis.yml index cce5c682a8..a549d113c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js node_js: - - "0.10" + - '4.4' before_script: - export DISPLAY=:99.0 diff --git a/e2e-tests/protractor.conf.js b/e2e-tests/protractor.conf.js index b45a117aa5..00893f98ef 100644 --- a/e2e-tests/protractor.conf.js +++ b/e2e-tests/protractor.conf.js @@ -1,4 +1,6 @@ +//jshint strict: false exports.config = { + allScriptsTimeout: 11000, specs: [ @@ -16,4 +18,5 @@ exports.config = { jasmineNodeOpts: { defaultTimeoutInterval: 30000 } + }; diff --git a/karma.conf.js b/karma.conf.js index 44bb29f1ab..7271e9fef8 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,30 +1,31 @@ -module.exports = function(config){ +//jshint strict: false +module.exports = function(config) { config.set({ - basePath : './', + basePath: './app', - files : [ - 'app/bower_components/angular/angular.js', - 'app/bower_components/angular-route/angular-route.js', - 'app/bower_components/angular-mocks/angular-mocks.js', - 'app/components/**/*.js', - 'app/view*/**/*.js' + files: [ + 'bower_components/angular/angular.js', + 'bower_components/angular-route/angular-route.js', + 'bower_components/angular-mocks/angular-mocks.js', + 'components/**/*.js', + 'view*/**/*.js' ], - autoWatch : true, + autoWatch: true, frameworks: ['jasmine'], - browsers : ['Chrome'], + browsers: ['Chrome'], - plugins : [ - 'karma-chrome-launcher', - 'karma-firefox-launcher', - 'karma-jasmine', - 'karma-junit-reporter' - ], + plugins: [ + 'karma-chrome-launcher', + 'karma-firefox-launcher', + 'karma-jasmine', + 'karma-junit-reporter' + ], - junitReporter : { + junitReporter: { outputFile: 'test_out/unit.xml', suite: 'unit' }