summaryrefslogtreecommitdiff
path: root/openstack_dashboard/karma.conf.js
diff options
context:
space:
mode:
authorMichael Krotscheck <krotscheck@gmail.com>2015-08-17 12:03:21 -0700
committerRob Cresswell <robert.cresswell@outlook.com>2015-08-20 17:07:08 +0100
commitc50acff6d8ae92c49d194b9d39564c06f3fd550f (patch)
treea58f463f83a1aa2b2c65cf0f6767299e3f481023 /openstack_dashboard/karma.conf.js
parentba980a5f13fcbefbf0c49a70a13c3853727904cd (diff)
downloadhorizon-c50acff6d8ae92c49d194b9d39564c06f3fd550f.tar.gz
Added karma threshold reporting & failure
This patch adds unit test coverage threshold reporting, adding statement, branch, function, and line coverage to the console output in infra, and failing the build if the threshold has not been met. The threshold values have been set to the current observed coverage values - future patches should update this up as coverage improves. Closes-Bug: 1487109 Change-Id: Ie83ebf5d976b3538e3528787b05de3e83df18af8
Diffstat (limited to 'openstack_dashboard/karma.conf.js')
-rw-r--r--openstack_dashboard/karma.conf.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/openstack_dashboard/karma.conf.js b/openstack_dashboard/karma.conf.js
index 27ddfb49e..9cc623be3 100644
--- a/openstack_dashboard/karma.conf.js
+++ b/openstack_dashboard/karma.conf.js
@@ -143,18 +143,27 @@ module.exports = function (config) {
exitOnResourceError: true
},
- reporters: ['progress', 'coverage'],
+ reporters: ['progress', 'coverage', 'threshold'],
plugins: [
'karma-phantomjs-launcher',
'karma-jasmine',
'karma-ng-html2js-preprocessor',
- 'karma-coverage'
+ 'karma-coverage',
+ 'karma-threshold-reporter'
],
coverageReporter: {
type: 'html',
dir: '../.coverage-karma/'
+ },
+
+ // Coverage threshold values.
+ thresholdReporter: {
+ statements: 93, // target 100
+ branches: 93, // target 100
+ functions: 93, // target 100
+ lines: 93 // target 100
}
});
};