提交 ce03103d 编写于 作者: M mzabriskie

Adding coveralls

上级 a98c61f4
.idea
*.iml *.iml
node_modules .idea
.tscache .tscache
.DS_Store
node_modules/
coverage/
test/typescript/axios.js* test/typescript/axios.js*
...@@ -4,3 +4,5 @@ email: ...@@ -4,3 +4,5 @@ email:
on_success: never on_success: never
before_script: before_script:
- npm install -g grunt-cli - npm install -g grunt-cli
after_success:
- npm run coveralls
...@@ -29,15 +29,20 @@ module.exports = function(config) { ...@@ -29,15 +29,20 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser // preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: { preprocessors: {
'dist/axios.js': 'coverage'
}, },
// 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'],
coverageReporter: {
type: 'lcov',
dir: 'coverage/',
subdir: '.'
},
// web server port // web server port
port: 9876, port: 9876,
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "grunt test", "test": "grunt test",
"start": "node ./sandbox/server.js" "start": "node ./sandbox/server.js",
"coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
...@@ -28,6 +29,7 @@ ...@@ -28,6 +29,7 @@
"es6-promise": "^2.0.1" "es6-promise": "^2.0.1"
}, },
"devDependencies": { "devDependencies": {
"coveralls": "^2.11.2",
"grunt": "^0.4.5", "grunt": "^0.4.5",
"grunt-banner": "^0.3.1", "grunt-banner": "^0.3.1",
"grunt-contrib-clean": "^0.6.0", "grunt-contrib-clean": "^0.6.0",
...@@ -39,6 +41,7 @@ ...@@ -39,6 +41,7 @@
"grunt-update-json": "^0.2.1", "grunt-update-json": "^0.2.1",
"grunt-webpack": "^1.0.8", "grunt-webpack": "^1.0.8",
"karma": "^0.12.31", "karma": "^0.12.31",
"karma-coverage": "^0.2.7",
"karma-jasmine": "^0.3.5", "karma-jasmine": "^0.3.5",
"karma-jasmine-ajax": "^0.1.12", "karma-jasmine-ajax": "^0.1.12",
"karma-phantomjs-launcher": "^0.1.4", "karma-phantomjs-launcher": "^0.1.4",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册