summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--web-ui/karma.conf.js11
-rw-r--r--web-ui/package.json1
3 files changed, 12 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index a1aa40c8..e585b65e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,3 +32,4 @@ __pycache__/
/config
pixelated.cfg
service/_trial_temp/
+web-ui/coverage
diff --git a/web-ui/karma.conf.js b/web-ui/karma.conf.js
index 7b1d699c..48a7ac60 100644
--- a/web-ui/karma.conf.js
+++ b/web-ui/karma.conf.js
@@ -56,7 +56,11 @@ module.exports = function (config) {
// test results reporter to use
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
- reporters: ['progress', 'junit'],
+ reporters: ['progress', 'junit', 'coverage'],
+
+ preprocessors: {
+ 'app/js/!(lib)/**/*.js': ['coverage']
+ },
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
@@ -87,6 +91,11 @@ module.exports = function (config) {
junitReporter: {
outputFile: 'test-results.xml',
suite: ''
+ },
+
+ coverageReporter: {
+ type : 'html',
+ dir : 'coverage/'
}
});
diff --git a/web-ui/package.json b/web-ui/package.json
index fe35ded9..4358ca5e 100644
--- a/web-ui/package.json
+++ b/web-ui/package.json
@@ -15,6 +15,7 @@
"karma-junit-reporter": "0.2.2",
"karma-phantomjs-launcher": "0.1.4",
"karma-requirejs": "0.2.2",
+ "karma-coverage": "~0.1",
"minify": "1.4.1",
"requirejs": "2.1.15",
"watch": "^0.13.0"