1- /*global module*/
2- module . exports = function ( config ) {
1+ module . exports = function ( config )
2+ {
33 'use strict' ;
44
55 config . set ( {
@@ -13,26 +13,31 @@ module.exports = function (config) {
1313 frameworks : [ 'jasmine' ] ,
1414
1515 // list of files / patterns to load in the browser
16- files : [
17- ' bower_components/angular/angular.js',
18- 'bower_components/angular-mocks/angular-mocks .js',
19- 'app/**/*.js' , 'test/spec/** /*.js'
20- ] ,
16+ files : [ 'app/bower_components/angular/angular.js' ,
17+ 'app/ bower_components/angular-mocks /angular-mocks .js',
18+ 'app/* .js',
19+ 'app/!(bower_components)/** /*.js' ,
20+ 'test/unit/**/*.spec.js' ] ,
2121
2222 // list of files / patterns to exclude
2323 exclude : [ ] ,
2424
25- // test results reporter to use
26- // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
27- reporters : [ 'spec' , 'coverage' ] ,
25+ reporters : [ 'spec' , 'coverage' , 'junit' ] ,
2826
2927 preprocessors : {
30- 'app/**/*.js' : 'coverage'
28+ 'app/*.js' : 'coverage' ,
29+ 'app/!(bower_components)/**/*.js' : 'coverage'
3130 } ,
3231
3332 coverageReporter : {
34- dir : 'target/coverage/' ,
35- type : 'html'
33+ dir : 'target/' ,
34+ type : 'cobertura' ,
35+ file : 'coverage.xml'
36+ } ,
37+
38+
39+ junitReporter : {
40+ outputFile : 'target/test-results.xml'
3641 } ,
3742
3843 // web server port
@@ -46,18 +51,14 @@ module.exports = function (config) {
4651 // - Safari (only Mac)
4752 // - PhantomJS
4853 // - IE (only Windows)
49- browsers : [
50- 'PhantomJS'
51- ] ,
54+ browsers : [ 'PhantomJS' ] ,
5255
5356 // Which plugins to enable
54- plugins : [
55- 'karma-phantomjs-launcher' , 'karma-coverage' , 'karma-jasmine' , 'karma-spec-reporter'
56- ] ,
57+ plugins : [ 'karma-phantomjs-launcher' , 'karma-jasmine' , 'karma-spec-reporter' , 'karma-junit-reporter' , 'karma-coverage' ] ,
5758
5859 // Continuous Integration mode
5960 // if true, it capture browsers, run tests and exit
60- singleRun : false ,
61+ singleRun : true ,
6162
6263 colors : true ,
6364
@@ -67,7 +68,6 @@ module.exports = function (config) {
6768
6869 //https://github.com/karma-runner/karma/issues/895
6970 usePolling : true
70-
7171 // Uncomment the following lines if you are using grunt's server to run the tests
7272 // proxies: {
7373 // '/': 'http://localhost:9000/'
0 commit comments