Skip to content

Commit

Permalink
fix(server-tests): test:coverage task
Browse files Browse the repository at this point in the history
Changes:
- add missing `option` argument from `test` task
- define `istanbul_check_coverage` with `jit-grunt`
- place server coverage reports in their own folder: `coverage/server`
  • Loading branch information
kingcody committed Aug 30, 2014
1 parent 4babb07 commit 5198685
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/templates/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ module.exports = function (grunt) {
cdnify: 'grunt-google-cdn',
protractor: 'grunt-protractor-runner',
injector: 'grunt-asset-injector',
buildcontrol: 'grunt-build-control'
buildcontrol: 'grunt-build-control',
istanbul_check_coverage: 'grunt-mocha-istanbul'
});

// Time how long tasks take. Can help when optimizing build times
Expand Down Expand Up @@ -508,7 +509,7 @@ module.exports = function (grunt) {
reporter: 'spec',
require: ['mocha.conf.js'],
mask: '**/*.spec.js',
coverageFolder: 'coverage/unit'
coverageFolder: 'coverage/server/unit'
},
src: 'server'
},
Expand All @@ -522,7 +523,7 @@ module.exports = function (grunt) {
reporter: 'spec',
require: ['mocha.conf.js'],
mask: '**/*.e2e.js',
coverageFolder: 'coverage/e2e'
coverageFolder: 'coverage/server/e2e'
},
src: 'server'
}
Expand All @@ -531,7 +532,7 @@ module.exports = function (grunt) {
istanbul_check_coverage: {
default: {
options: {
coverageFolder: 'coverage/*',
coverageFolder: 'coverage/**',
check: {
lines: 80,
statements: 80,
Expand Down Expand Up @@ -815,7 +816,7 @@ module.exports = function (grunt) {
grunt.task.run(['serve']);
});

grunt.registerTask('test', function(target) {
grunt.registerTask('test', function(target, option) {
if (target === 'server') {
return grunt.task.run([
'env:all',
Expand Down

0 comments on commit 5198685

Please sign in to comment.