add threshold reporter and fix travis

This commit is contained in:
Keegan
2016-01-27 00:38:32 -08:00
parent 503605952f
commit f91ab1993a
2 changed files with 19 additions and 2 deletions
+3 -1
View File
@@ -7,7 +7,7 @@
"example": "example"
},
"scripts": {
"test-travis": "./node_modules/karma/bin/karma start ./test/karma.conf.js --single-run",
"test-travis": "./node_modules/karma/bin/karma start ./test/karma.conf.js --single-run --browsers chromeTravisCI",
"test": "./node_modules/karma/bin/karma start ./test/karma.conf.js --no-single-run",
"build": "gulp"
},
@@ -33,6 +33,7 @@
"eslint-config-pebble": "^1.2.0",
"eslint-plugin-standard": "^1.3.1",
"gulp-autoprefixer": "^3.1.0",
"gulp-htmlmin": "^1.3.0",
"gulp-sass": "^2.1.1",
"gulp-sourcemaps": "^1.6.0",
"karma": "^0.13.19",
@@ -42,6 +43,7 @@
"karma-mocha": "^0.2.1",
"karma-mocha-reporter": "^1.1.5",
"karma-source-map-support": "^1.1.0",
"karma-threshold-reporter": "^0.1.15",
"mocha": "^2.3.4",
"watchify": "^3.7.0"
},
+16 -1
View File
@@ -45,7 +45,7 @@ module.exports = function(config) {
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress', 'mocha', 'coverage'],
reporters: ['progress', 'mocha', 'coverage', 'threshold'],
// optionally, configure the reporter
coverageReporter: {
@@ -56,6 +56,13 @@ module.exports = function(config) {
]
},
thresholdReporter: {
statements: 100,
branches: 100,
functions: 100,
lines: 100
},
// web server port
port: 9876,
@@ -74,6 +81,14 @@ module.exports = function(config) {
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
// set via the command line
customLaunchers: {
chromeTravisCI: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,