Commit 6e5fa2b1f2ed052038cf88ac59cb08a7fd9553d6

Authored by Leonardo Merlin
1 parent 58369d42

Add karma coverage deps

Showing 3 changed files with 27 additions and 11 deletions   Show diff stats
@@ -4,6 +4,7 @@ bower_components/ @@ -4,6 +4,7 @@ bower_components/
4 .idea/ 4 .idea/
5 .tmp/ 5 .tmp/
6 dist/ 6 dist/
  7 +coverage/
7 .editorconfig 8 .editorconfig
8 script-staging.sh 9 script-staging.sh
9 10
@@ -13,12 +13,12 @@ function listFiles() { @@ -13,12 +13,12 @@ function listFiles() {
13 }); 13 });
14 14
15 return wiredep(wiredepOptions).js 15 return wiredep(wiredepOptions).js
16 - .concat([  
17 - path.join(conf.paths.src, '/app/**/*.module.js'),  
18 - path.join(conf.paths.src, '/app/**/*.js'),  
19 - path.join(conf.paths.src, '/**/*.spec.js'),  
20 - path.join(conf.paths.src, '/**/*.mock.js'),  
21 - path.join(conf.paths.src, '/**/*.html') 16 + .concat([
  17 + path.join(conf.paths.src, '/app/**/*.module.js'),
  18 + path.join(conf.paths.src, '/app/**/*.js'),
  19 + path.join(conf.paths.src, '/**/*.spec.js'),
  20 + path.join(conf.paths.src, '/**/*.mock.js'),
  21 + path.join(conf.paths.src, '/**/*.html')
22 ]); 22 ]);
23 } 23 }
24 24
@@ -45,14 +45,26 @@ module.exports = function(config) { @@ -45,14 +45,26 @@ module.exports = function(config) {
45 browsers : ['PhantomJS'], 45 browsers : ['PhantomJS'],
46 46
47 plugins : [ 47 plugins : [
48 - 'karma-phantomjs-launcher',  
49 - 'karma-angular-filesort',  
50 - 'karma-jasmine',  
51 - 'karma-ng-html2js-preprocessor' 48 + 'karma-jasmine',
  49 + 'karma-coverage',
  50 + 'karma-angular-filesort',
  51 + 'karma-ng-html2js-preprocessor',
  52 + 'karma-phantomjs-launcher',
  53 + 'karma-chrome-launcher',
  54 + 'karma-firefox-launcher'
52 ], 55 ],
53 56
54 preprocessors: { 57 preprocessors: {
55 - 'src/**/*.html': ['ng-html2js'] 58 + 'src/**/*.html': ['ng-html2js'],
  59 + 'src/app/**/*.js': ['coverage']
  60 + },
  61 +
  62 + reporters: ['progress', 'coverage'],
  63 +
  64 + coverageReporter: {
  65 + type : 'lcov', // HTML + LCOV
  66 + // type : 'cobertura', // supported by jenkins
  67 + dir : 'coverage/'
56 } 68 }
57 }; 69 };
58 70
@@ -39,6 +39,9 @@ @@ -39,6 +39,9 @@
39 "jshint-stylish": "~2.0.0", 39 "jshint-stylish": "~2.0.0",
40 "karma": "~0.12.36", 40 "karma": "~0.12.36",
41 "karma-angular-filesort": "~0.1.0", 41 "karma-angular-filesort": "~0.1.0",
  42 + "karma-chrome-launcher": "^0.2.1",
  43 + "karma-coverage": "^0.5.3",
  44 + "karma-firefox-launcher": "^0.1.7",
42 "karma-jasmine": "~0.3.5", 45 "karma-jasmine": "~0.3.5",
43 "karma-ng-html2js-preprocessor": "~0.1.2", 46 "karma-ng-html2js-preprocessor": "~0.1.2",
44 "karma-phantomjs-launcher": "~0.2.0", 47 "karma-phantomjs-launcher": "~0.2.0",