Skip to content

Commit

Permalink
Issue #3 tried added coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
thompson318 committed May 4, 2022
1 parent d0cc0e5 commit fdd31c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ module.exports = function(config) {
plugins: [
require('karma-webpack'),
require('karma-jasmine'),
require('karma-coverage'),
require('karma-coveralls'),
require('karma-chrome-launcher'),
],

Expand Down Expand Up @@ -38,7 +40,7 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://www.npmjs.com/search?q=keywords:karma-preprocessor
preprocessors: {
'src/**/*.js': ['webpack'],
'src/*.js': ['webpack', 'coverage'],
'src/**/*Spec.js': ['webpack'],
},

Expand Down Expand Up @@ -68,8 +70,12 @@ module.exports = function(config) {
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://www.npmjs.com/search?q=keywords:karma-reporter
reporters: ['progress'],
reporters: ['progress', 'coverage', 'coveralls'],

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

// web server port
port: 9876,
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"esm": "^3.2.25",
"karma": "^6.3.19",
"karma-chrome-launcher": "^3.1.1",
"karma-coverage": "^2.2.0",
"karma-coveralls": "^2.1.0",
"karma-firefox-launcher": "^2.1.2",
"karma-jasmine": "^5.0.0",
"karma-typescript-preprocessor": "^0.4.0",
Expand Down

0 comments on commit fdd31c4

Please sign in to comment.