Skip to content

Commit

Permalink
Merge pull request #3 from straker/coveralls
Browse files Browse the repository at this point in the history
chore(coverage): adding code coverage using coveralls.io
  • Loading branch information
straker committed Sep 23, 2015
2 parents be2a587 + b5ecbcd commit ff6c19f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
.DS_Store
kontra.build.js
kontra.build.min.js
index.html
index.html
coverage
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
language: node_js
node_js:
- "0.12"
- "0.12"
after_script: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Build Status](https://travis-ci.org/straker/kontra.svg?branch=master)](https://travis-ci.org/straker/kontra)
[![GitHub version](https://badge.fury.io/gh/straker%2Fkontra.svg)](http://badge.fury.io/gh/straker%2Fkontra)
[![Build Status](https://travis-ci.org/straker/kontra.svg?branch=master)](https://travis-ci.org/straker/kontra)
[![Coverage Status](https://coveralls.io/repos/straker/kontra/badge.svg?branch=coveralls&service=github)](https://coveralls.io/github/straker/kontra?branch=coveralls)

# Kontra.js

Expand Down
17 changes: 15 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,26 @@
module.exports = function(config) {
config.set({
basePath: '',
singleRun: true,
autoWatch: false,
frameworks: ['mocha', 'chai', 'sinon'],
files: [
// assets
'test/phantom.polyfill.js',
'kontra.js',
'src/*.js',
'test/*.js'
],
browsers: ['Chrome', 'Firefox', 'Safari', 'IE']
browsers: ['PhantomJS'],
reporters: ['progress', 'coverage'],
preprocessors: {
'src/*.js': ['coverage']
},
coverageReporter: {
dir : 'coverage/',
reporters: [
{type: 'lcov', subdir: '.'},
{type: 'text-summary'}
]
}
});
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"devDependencies": {
"chai": "^3.2.0",
"colors": "^1.1.0",
"coveralls": "^2.11.4",
"gulp": "^3.8.11",
"gulp-concat-util": "^0.5.2",
"gulp-connect": "^2.2.0",
Expand All @@ -40,6 +41,7 @@
"karma": "^0.13.9",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^0.2.0",
"karma-coverage": "^0.5.2",
"karma-firefox-launcher": "^0.1.6",
"karma-ie-launcher": "^0.2.0",
"karma-mocha": "^0.2.0",
Expand Down

0 comments on commit ff6c19f

Please sign in to comment.