From fe89033310cc497f5eb0c7f9d64051197be81b9b Mon Sep 17 00:00:00 2001 From: Braun Patrik Date: Sun, 13 Mar 2016 19:57:40 +0100 Subject: [PATCH] test update --- .gitignore | 1 + karma.conf.js | 10 +++------- package.json | 3 ++- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index f5a53f07..3114ad6a 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ backend/*.js.map common/*/*.js common/*/*.js.map test/coverage +.coveralls.yml \ No newline at end of file diff --git a/karma.conf.js b/karma.conf.js index 6fc2e491..ec010fe3 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -27,12 +27,8 @@ module.exports = function(config) { webpack: testWebpackConfig, coverageReporter: { - dir : 'coverage/', - reporters: [ - { type: 'text-summary' }, - { type: 'json' }, - { type: 'html' } - ] + type: 'lcov', // lcov or lcovonly are required for generating lcov.info files + dir: 'coverage/' }, // Webpack please don't spam the console when running in karma! @@ -41,7 +37,7 @@ module.exports = function(config) { // test results reporter to use // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: [ 'mocha', 'coverage' ], + reporters: [ 'mocha', 'coverage', 'coveralls' ], // web server port port: 9876, diff --git a/package.json b/package.json index 334f103f..494c21e8 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "homepage": "https://github.com/bpatrik/PiGallery2", "license": "MIT", "scripts": { - "build": "webpack -p", + "build": "webpack -p && tsc -p backend", "test": "karma start ./karma.conf.js", "start": "node ./backend/server" }, @@ -43,6 +43,7 @@ "karma": "^0.13.21", "karma-chrome-launcher": "^0.2.2", "karma-coverage": "^0.5.3", + "karma-coveralls": "^1.1.2", "karma-jasmine": "^0.3.7", "karma-mocha-reporter": "^2.0.0", "karma-phantomjs-launcher": "^1.0.0",