Skip to content

Commit

Permalink
[added] JUnit reporter for CircleCI
Browse files Browse the repository at this point in the history
Summary: [Recommended by CircleCI](https://circleci.com/docs/1.0/test-metadata/#karma)

Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, featherless

Reviewed By: O2 Material Motion, #material_motion, featherless

Tags: #material_motion

Differential Revision: http://codereview.cc/D2919
  • Loading branch information
appsforartists committed Mar 23, 2017
1 parent d98019d commit b5023f7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
11 changes: 10 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ module.exports = function(config) {
browsers: process.env.CI
? ['Chrome', 'Firefox']
: ['ChromeCanary'],
reporters: ['progress'],

// CircleCI needs JUnit to show tests correctly.
// https://circleci.com/docs/1.0/test-metadata/#karma
reporters: process.env.CI
? ['junit']
: ['progress'],
junitReporter: {
outputDir: process.env.CIRCLE_TEST_REPORTS,
},

client: {
mocha: {
reporter: 'html',
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
"karma": "1.3.0",
"karma-chrome-launcher": "2.0.0",
"karma-firefox-launcher": "1.0.0",
"karma-junit-reporter": "1.2.0",
"karma-mocha": "1.2.0",
"karma-safari-launcher": "1.0.0",
"karma-webpack": "1.8.0",
"lerna": "2.0.0-beta.38",
"minimist": "^1.2.0",
"minimist": "1.2.0",
"mocha": "3.1.1",
"mocha-sugar-free": "1.3.1",
"pundle": "2.0.0-beta12",
"pundle-api": "2.0.0-beta12",
"pundle-browser": "2.0.0-beta12",
"pundle-cli": "2.0.0-beta12",
Expand All @@ -37,7 +39,6 @@
"pundle-reporter-cli": "2.0.0-beta12",
"pundle-resolver-default": "2.0.0-beta12",
"pundle-transformer-typescript": "2.0.0-beta12",
"pundle": "2.0.0-beta12",
"sinon": "2.0.0-pre.3",
"sinon-chai": "2.8.0",
"ts-loader": "2.0.3",
Expand Down
11 changes: 11 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1776,6 +1776,13 @@ karma-firefox-launcher@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/karma-firefox-launcher/-/karma-firefox-launcher-1.0.0.tgz#e08af3ce42e39860c2952ea7b7eaa64d63508bdc"

karma-junit-reporter@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/karma-junit-reporter/-/karma-junit-reporter-1.2.0.tgz#4f9c40cedfb1a395f8aef876abf96189917c6396"
dependencies:
path-is-absolute "^1.0.0"
xmlbuilder "8.2.2"

karma-mocha@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/karma-mocha/-/karma-mocha-1.2.0.tgz#bca6be2a66805b847417e8d2873fd0b5b27ee7cd"
Expand Down Expand Up @@ -3714,6 +3721,10 @@ xdg-basedir@^2.0.0:
dependencies:
os-homedir "^1.0.0"

xmlbuilder@8.2.2:
version "8.2.2"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-8.2.2.tgz#69248673410b4ba42e1a6136551d2922335aa773"

xmlhttprequest-ssl@1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.1.tgz#3b7741fea4a86675976e908d296d4445961faa67"
Expand Down

0 comments on commit b5023f7

Please sign in to comment.