Skip to content

Commit

Permalink
Add karma coverage reporting; added coverage folder to .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
gisikw committed Jun 9, 2015
1 parent 2b846e8 commit 9795fda
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ test/*.js
test/*.map
website/public/docs
*.sublime-workspace
coverage
coverage.html
common/dist/scripts/habitrpg-shared.js

Expand Down
11 changes: 10 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,17 @@ module.exports = function(config) {
// - IE (only Windows)
browsers: ['PhantomJS'],

preprocessors: {
'website/public/js/**/*.js': ['coverage']
},

coverageReporter: {
type: 'lcov',
dir: 'coverage/karma'
},

// Enable mocha-style reporting, for better test visibility
reporters: ['mocha'],
reporters: ['mocha', 'coverage'],

// Continuous Integration mode
// if true, it capture browsers, run tests and exit
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"karma-chai-plugins": "~0.1.0",
"karma-chrome-launcher": "~0.1.0",
"karma-coffee-preprocessor": "~0.1.0",
"karma-coverage": "^0.3.1",
"karma-firefox-launcher": "~0.1.0",
"karma-html2js-preprocessor": "~0.1.0",
"karma-jasmine": "~0.1.3",
Expand Down

0 comments on commit 9795fda

Please sign in to comment.