Skip to content

Commit

Permalink
Fixed coveralls support
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCodeDestroyer committed Jan 18, 2015
1 parent 82ecb0d commit 3d7e6a1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_js:
before_install: npm install -g grunt-cli bower
install: npm install
before_script: bower install
after_script: grunt coveralls
7 changes: 7 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ module.exports = function(grunt) {
configFile: 'karma.conf.js'
}
},
coveralls: {
options: {
coverageDir: 'www/test/coverage/'
}
},
watch: {
files: ['Gruntfile.js',
'www/js/**/*.js'
Expand Down Expand Up @@ -292,7 +297,9 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-phonegap');
grunt.loadNpmTasks('grunt-bumpup');

grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-karma-coveralls');

grunt.registerTask('test', ['jshint', 'karma']);
grunt.registerTask('build', [
Expand Down
8 changes: 6 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ module.exports = function(config) {
},

coverageReporter: {
type: 'html',
dir: 'www/test/coverage/'
type: 'lcov',
dir: 'www/test/coverage/',
reporters: [
// reporters not supporting the `file` property
{ type: 'lcov', subdir: '.' }
]
},

// test results reporter to use
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"karma-chai": "~0.1.0",
"karma-mocha-reporter": "~0.3.1",
"grunt-karma": "~0.10.1",
"karma-phantomjs-launcher": "~0.1.4"
"karma-phantomjs-launcher": "~0.1.4",
"grunt-karma-coveralls": "~2.5.3"
}
}

0 comments on commit 3d7e6a1

Please sign in to comment.