Skip to content

Commit

Permalink
Merge branch 'feature-add-client-to-coveralls-#162' into develop
Browse files Browse the repository at this point in the history
Conflicts:
	spec/karma.conf.js
  • Loading branch information
AndrewSouthpaw committed Feb 7, 2015
2 parents 902169c + 80b0560 commit 5fd3f91
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
24 changes: 22 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,29 @@ gulp.task('mocha', function (cb) {
* Sends code coverage data to Coveralls.
*/
gulp.task('coveralls', function () {
if (!process.env.CI) return;
return gulp.src('./coverage/lcov.info')
// if (!process.env.CI) return;
return gulp
.src([
'./coverage/client/lcovTest/lcov.info',
'./coverage/lcov.info'
])
.pipe(concat('lcov.info'))
.pipe(coveralls());
// return gulp.src('./coverage/lcov.info')
// .pipe(coveralls());
});



gulp.task('testy', function () {
// return gulp.src([
// './coverage/client/lcov.info',
// './coverage/lcov.info'
// ])
// .pipe(concat('combined.info'))
// .pipe(gulp.dest('./coverage'))
return gulp.src('./coverage/combined.info')
.pipe(coveralls());
});

gulp.task('watch', function() {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^0.1.7",
"karma-cli": "0.0.4",
"karma-coverage": "^0.2.7",
"karma-mocha": "^0.1.10",
"mocha": "^2.1.0",
"request": "^2.51.0",
Expand Down
16 changes: 15 additions & 1 deletion spec/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,25 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
/**
* source files to test coverage for
* do not include tests or libraries
* (these files will be instrumented by Istanbul)
*/
'client/app/src/js/**/*.js': ['coverage']
},

// optionally, configure the coverage reporter
coverageReporter: {
type : 'lcov',
dir : 'coverage/client',
subdir: 'lcovTest'
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
reporters: ['progress', 'coverage'],


// web server port
Expand Down Expand Up @@ -73,6 +85,8 @@ module.exports = function(config) {
},




// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
Expand Down

0 comments on commit 5fd3f91

Please sign in to comment.