diff --git a/.gitignore b/.gitignore
index eb0875a977f411678e9a0e83097186e3625e1769..82b3d08f7a88f2370c7f15ca70aaa480e1c7bed9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -78,3 +78,4 @@ eslint-report.html
 /.gitlab_pages_secret
 package-lock.json
 /junit_rspec.xml
+/junit_karma.xml
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c0b622f5abd8af8d6af4e26bb4e3c16b0af7b220..cc27ac3677b7fed2bfcc9f24f9f2d481042a3271 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -743,6 +743,8 @@ karma:
     paths:
       - chrome_debug.log
       - coverage-javascript/
+    reports:
+      junit: junit_karma.xml
 
 code_quality:
   <<: *dedicated-no-docs-no-db-pull-cache-job
diff --git a/config/karma.config.js b/config/karma.config.js
index 84810332dc2bafc7526de5445054d8087c99e015..c890c6706190152d08eb4250bb6c2525271090cc 100644
--- a/config/karma.config.js
+++ b/config/karma.config.js
@@ -80,11 +80,12 @@ if (specFilters.length) {
 module.exports = function(config) {
   process.env.TZ = 'Etc/UTC';
 
-  const progressReporter = process.env.CI ? 'mocha' : 'progress';
-
   const karmaConfig = {
     basePath: ROOT_PATH,
     browsers: ['ChromeHeadlessCustom'],
+    client: {
+      isCI: !!process.env.CI
+    },
     customLaunchers: {
       ChromeHeadlessCustom: {
         base: 'ChromeHeadless',
@@ -104,11 +105,19 @@ module.exports = function(config) {
     preprocessors: {
       'spec/javascripts/**/*.js': ['webpack', 'sourcemap'],
     },
-    reporters: [progressReporter],
+    reporters: ['progress'],
     webpack: webpackConfig,
     webpackMiddleware: { stats: 'errors-only' },
   };
 
+  if (process.env.CI) {
+    karmaConfig.reporters = ['mocha', 'junit'];
+    karmaConfig.junitReporter = {
+      outputFile: 'junit_karma.xml',
+      useBrowserName: false,
+    };
+  }
+
   if (process.env.BABEL_ENV === 'coverage' || process.env.NODE_ENV === 'coverage') {
     karmaConfig.reporters.push('coverage-istanbul');
     karmaConfig.coverageIstanbulReporter = {
diff --git a/package.json b/package.json
index 1d69a9feb336e5cb4c6f9a8f8227b9ada2e5f248..6dd6a84f1e05808323f5a71f203590c28496a74e 100644
--- a/package.json
+++ b/package.json
@@ -137,6 +137,7 @@
     "karma-chrome-launcher": "^2.2.0",
     "karma-coverage-istanbul-reporter": "^1.4.2",
     "karma-jasmine": "^1.1.2",
+    "karma-junit-reporter": "^1.2.0",
     "karma-mocha-reporter": "^2.2.5",
     "karma-sourcemap-loader": "^0.3.7",
     "karma-webpack": "^4.0.0-beta.0",
diff --git a/spec/javascripts/gfm_auto_complete_spec.js b/spec/javascripts/gfm_auto_complete_spec.js
index 1cb20a1e7ff38a5a56ce2b0714e4bcbb82c932e5..4f9cacf2724805bbae409f48a9a046f77c851427 100644
--- a/spec/javascripts/gfm_auto_complete_spec.js
+++ b/spec/javascripts/gfm_auto_complete_spec.js
@@ -146,7 +146,7 @@ describe('GfmAutoComplete', function () {
         shouldNotBeFollowedBy.forEach((followedSymbol) => {
           const seq = atSign + followedSymbol;
 
-          it(`should not match "${seq}"`, () => {
+          it(`should not match ${JSON.stringify(seq)}`, () => {
             expect(defaultMatcher(atwhoInstance, atSign, seq)).toBe(null);
           });
         });
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js
index 4452c470b8222d7c0f9e9ca5ab75da92e6f2ae1a..b89d10cb993561eac66251240d00649c723a5b3b 100644
--- a/spec/javascripts/test_bundle.js
+++ b/spec/javascripts/test_bundle.js
@@ -1,6 +1,7 @@
 /* eslint-disable
   jasmine/no-global-setup, jasmine/no-unsafe-spy, no-underscore-dangle, no-console
 */
+/* global __karma__ */
 
 import $ from 'jquery';
 import 'vendor/jasmine-jquery';
@@ -41,8 +42,8 @@ jasmine.getJSONFixtures().fixturesPath = FIXTURES_PATH;
 beforeAll(() => {
   jasmine.addMatchers(
     jasmineDiff(jasmine, {
-      colors: true,
-      inline: true,
+      colors: !__karma__.config.isCi,
+      inline: !__karma__.config.isCi,
     }),
   );
   jasmine.addMatchers(customMatchers);
diff --git a/yarn.lock b/yarn.lock
index 57ec6096549723f6096d6de1cf7a651e4402345e..27ba4c6ac0b8ae6b4695390b56ba801695a7493b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4220,6 +4220,13 @@ karma-jasmine@^1.1.2:
   version "1.1.2"
   resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-1.1.2.tgz#394f2b25ffb4a644b9ada6f22d443e2fd08886c3"
 
+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-reporter@^2.2.5:
   version "2.2.5"
   resolved "https://registry.yarnpkg.com/karma-mocha-reporter/-/karma-mocha-reporter-2.2.5.tgz#15120095e8ed819186e47a0b012f3cd741895560"
@@ -7139,6 +7146,10 @@ xdg-basedir@^3.0.0:
   version "3.0.0"
   resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"
 
+xmlbuilder@8.2.2:
+  version "8.2.2"
+  resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-8.2.2.tgz#69248673410b4ba42e1a6136551d2922335aa773"
+
 xmlhttprequest-ssl@~1.5.4:
   version "1.5.5"
   resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e"