Skip to content

Commit 784b87a

Browse files
Add junit reporter for unit tests
1 parent 9930f0c commit 784b87a

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ phantomjsdriver.log
88
openshift-jvm
99
/app/config.local.js
1010
.DS_Store
11+
test/junit/

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,20 @@
4040
"grunt-wiredep": "3.0.0",
4141
"html-minifier": "1.1.1",
4242
"imagemin": "1.0.5",
43-
"jasmine-core": "^2.8.0",
4443
"jasmine-beforeall": "0.1.1",
44+
"jasmine-core": "^2.8.0",
4545
"jasmine-spec-reporter": "1.1.2",
4646
"jshint-stylish": "0.2.0",
4747
"karma": "^1.7.1",
4848
"karma-chrome-launcher": "^2.2.0",
4949
"karma-coverage": "^1.1.1",
5050
"karma-firefox-launcher": "^1.0.1",
5151
"karma-jasmine": "^1.1.0",
52-
"karma-ng-html2js-preprocessor": "^1.0.0",
5352
"karma-jasmine-diff-reporter": "^1.1.0",
54-
"karma-phantomjs-launcher": "^1.0.4",
53+
"karma-junit-reporter": "^1.2.0",
54+
"karma-ng-html2js-preprocessor": "^1.0.0",
5555
"karma-nightmare": "^0.4.10",
56+
"karma-phantomjs-launcher": "^1.0.4",
5657
"less": "2.6.1",
5758
"load-grunt-tasks": "0.4.0",
5859
"lodash": "3.10.1",

test/karma.conf.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ module.exports = function(config) {
131131
'karma-ng-html2js-preprocessor',
132132
'karma-jasmine',
133133
'karma-coverage',
134-
'karma-jasmine-diff-reporter'
134+
'karma-jasmine-diff-reporter',
135+
'karma-junit-reporter'
135136
],
136137

137138
// Continuous Integration mode
@@ -161,7 +162,7 @@ module.exports = function(config) {
161162
},
162163

163164
// order of reporters matters, input/output may break
164-
reporters: ['jasmine-diff', 'progress', 'coverage'],
165+
reporters: ['jasmine-diff', 'progress', 'coverage', 'junit'],
165166

166167
coverageReporter: {
167168
type: 'text',
@@ -174,6 +175,11 @@ module.exports = function(config) {
174175
legacy: true
175176
},
176177

178+
junitReporter: {
179+
// will be resolved to basePath (in the same way as files/exclude patterns)
180+
outputDir: 'test/junit/'
181+
},
182+
177183
nightmareOptions: {
178184
width: 1048,
179185
height: 600,

0 commit comments

Comments
 (0)