Merge "Added Istanbul integration"
This commit is contained in:
30
.istanbul.yml
Normal file
30
.istanbul.yml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
verbose: false
|
||||||
|
instrumentation:
|
||||||
|
root: .
|
||||||
|
includes:
|
||||||
|
- 'src/**'
|
||||||
|
default-excludes: true
|
||||||
|
reporting:
|
||||||
|
print: detail
|
||||||
|
reports:
|
||||||
|
- lcov
|
||||||
|
- html
|
||||||
|
dir: ./cover/node
|
||||||
|
watermarks:
|
||||||
|
statements: [50, 90]
|
||||||
|
lines: [50, 90]
|
||||||
|
functions: [50, 90]
|
||||||
|
branches: [50, 90]
|
||||||
|
check:
|
||||||
|
global:
|
||||||
|
statements: 50
|
||||||
|
lines: 50
|
||||||
|
branches: 50
|
||||||
|
functions: 0
|
||||||
|
excludes: []
|
||||||
|
each:
|
||||||
|
statements: 50
|
||||||
|
lines: 50
|
||||||
|
branches: 50
|
||||||
|
functions: 0
|
||||||
|
excludes: []
|
@@ -27,7 +27,7 @@ export default (config) => {
|
|||||||
// test results reporter to use
|
// test results reporter to use
|
||||||
// possible values: 'dots', 'progress'
|
// possible values: 'dots', 'progress'
|
||||||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||||
reporters: ['progress'],
|
reporters: ['progress', 'coverage', 'threshold'],
|
||||||
|
|
||||||
// web server port
|
// web server port
|
||||||
port: 9876,
|
port: 9876,
|
||||||
@@ -59,6 +59,20 @@ export default (config) => {
|
|||||||
webpackMiddleware: {
|
webpackMiddleware: {
|
||||||
// Don't spam the console.
|
// Don't spam the console.
|
||||||
noInfo: true
|
noInfo: true
|
||||||
|
},
|
||||||
|
|
||||||
|
// Generate a coverage report in /cover/karma
|
||||||
|
coverageReporter: {
|
||||||
|
type: 'html', //produces a html document after code is run
|
||||||
|
dir: 'cover/browser/' //path to created html doc
|
||||||
|
},
|
||||||
|
|
||||||
|
// The current coverage threshold values. These should never drop.
|
||||||
|
thresholdReporter: {
|
||||||
|
statements: 88,
|
||||||
|
branches: 64,
|
||||||
|
functions: 77,
|
||||||
|
lines: 75
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -5,8 +5,9 @@
|
|||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run test:node; npm run test:browser",
|
"test": "npm run test:node; npm run test:browser",
|
||||||
"test:node": "jasmine JASMINE_CONFIG_PATH=test/unit/jasmine.json",
|
"test:node": "istanbul cover jasmine JASMINE_CONFIG_PATH=test/unit/jasmine.json",
|
||||||
"test:browser": "karma start",
|
"test:browser": "karma start",
|
||||||
|
"posttest:node": "istanbul check-coverage",
|
||||||
"lint": "eslint ./",
|
"lint": "eslint ./",
|
||||||
"prepublish": "nsp check; npm run build",
|
"prepublish": "nsp check; npm run build",
|
||||||
"build": "babel src -d dist && webpack",
|
"build": "babel src -d dist && webpack",
|
||||||
@@ -34,11 +35,14 @@
|
|||||||
"babel-register": "^6.9.0",
|
"babel-register": "^6.9.0",
|
||||||
"eslint": "^2.4.0",
|
"eslint": "^2.4.0",
|
||||||
"eslint-config-openstack": "2.0.0",
|
"eslint-config-openstack": "2.0.0",
|
||||||
|
"istanbul": "^1.0.0-alpha.2",
|
||||||
"jasmine": "^2.4.1",
|
"jasmine": "^2.4.1",
|
||||||
"karma": "^1.1.1",
|
"karma": "^1.1.1",
|
||||||
"karma-chrome-launcher": "^1.0.1",
|
"karma-chrome-launcher": "^1.0.1",
|
||||||
|
"karma-coverage": "^1.1.0",
|
||||||
"karma-firefox-launcher": "^1.0.0",
|
"karma-firefox-launcher": "^1.0.0",
|
||||||
"karma-jasmine": "^1.0.2",
|
"karma-jasmine": "^1.0.2",
|
||||||
|
"karma-threshold-reporter": "^0.1.15",
|
||||||
"karma-webpack": "^1.7.0",
|
"karma-webpack": "^1.7.0",
|
||||||
"nsp": "^2.4.0",
|
"nsp": "^2.4.0",
|
||||||
"webpack": "^1.13.1"
|
"webpack": "^1.13.1"
|
||||||
|
Reference in New Issue
Block a user