Skip to content

Commit

Permalink
Add karma-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Supakit Thanadittagorn committed Jul 13, 2014
1 parent d8814a7 commit 3c49b7c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
coverage/
8 changes: 7 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'src/main/**/*.js': ['coverage'],
'src/roman/**/*.js': ['coverage'],
},


// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['dots'],
reporters: ['dots','coverage'],

coverageReporter: {
type : 'html',
dir : 'coverage/'
},

// web server port
port: 9876,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"karma": "~0.12.17",
"grunt-karma": "~0.8.3",
"karma-jasmine": "~0.1.5",
"karma-chrome-launcher": "~0.1.4"
"karma-chrome-launcher": "~0.1.4",
"karma-coverage": "~0.2.4"
}
}

0 comments on commit 3c49b7c

Please sign in to comment.