From c35a2c056759b6804558fe3eb4981c9c09495db3 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 6 Mar 2017 21:13:04 +0100 Subject: [PATCH] build: karma now reports with mocha formatter MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The progress reporter is quite nice to avoid spammy output to the terminal, but it is not very human friendly when trying to find out what is breaking. Mocha has a very nice reporting organized as modules and list items for each of the tests: ext.cx.tools.template ✖ Equivalent template exists ✔ Adapting a template not existing in target language ✖ Adapting template having invalid title ✖ Template name and params adaptation using templatedata ✖ Template params adaptation using templateData - English to French ✖ Template params adaptation using templateData - English to Spanish Add karma-mocha-reporter node module and make it the reporter. Change-Id: Ic7d848b45e8e5ad3839d8a2bd822b63838319ad7 --- Gruntfile.js | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 1ecc2c032f..6c56772720 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -88,7 +88,7 @@ module.exports = function ( grunt ) { } ], logLevel: 'DEBUG', frameworks: [ 'qunit' ], - reporters: [ 'progress' ], + reporters: [ 'mocha' ], singleRun: true, autoWatch: false, // Some tests in extensions don't yield for more than the default 10s (T89075) diff --git a/package.json b/package.json index 5a5635be75..2c22395328 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "karma": "1.1.0", "karma-chrome-launcher": "2.0.0", "karma-firefox-launcher": "1.0.0", + "karma-mocha-reporter": "2.2.3", "karma-qunit": "1.0.0", "qunitjs": "1.22.0", "stylelint-config-wikimedia": "0.4.1", -- 2.20.1