This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,16 @@ module.exports = function(grunt) {
135
135
travis : {
136
136
singleRun : true ,
137
137
browsers : [ 'Firefox' ]
138
+ } ,
139
+ coverage : {
140
+ singleRun : true ,
141
+ preprocessors : {
142
+ 'src/*/*.js' : 'coverage'
143
+ } ,
144
+ reporters : [ 'progress' , 'coverage' ] ,
145
+ coverageReporter : {
146
+ type : 'text'
147
+ }
138
148
}
139
149
} ,
140
150
changelog : {
@@ -316,11 +326,13 @@ module.exports = function(grunt) {
316
326
grunt . task . run ( [ 'concat' , 'uglify' ] ) ;
317
327
} ) ;
318
328
319
- grunt . registerTask ( 'test' , 'Run tests on singleRun karma server' , function ( ) {
329
+ grunt . registerTask ( 'test' , 'Run tests on singleRun karma server' , function ( subTask ) {
320
330
//this task can be executed in 3 different environments: local, Travis-CI and Jenkins-CI
321
331
//we need to take settings for each one into account
322
332
if ( process . env . TRAVIS ) {
323
333
grunt . task . run ( 'karma:travis' ) ;
334
+ } else if ( subTask === 'coverage' ) {
335
+ grunt . task . run ( 'karma:coverage' ) ;
324
336
} else {
325
337
grunt . task . run ( this . args . length ? 'karma:jenkins' : 'karma:continuous' ) ;
326
338
}
You can’t perform that action at this time.
0 commit comments