Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2013-11-25 07:35:29 +0400
committerThomas Steur <thomas.steur@gmail.com>2013-11-25 07:35:29 +0400
commit20d4c26853ebcbbffd614f75b3e06f183eb878f4 (patch)
treecd6a23b0f7c8cf088353e2faf75d267b5b281241 /tests/javascript/testrunner.js
parent942df1ddab446dda23194ad93baba79d03578819 (diff)
refs #4225 output expected and actual only if set
Diffstat (limited to 'tests/javascript/testrunner.js')
-rw-r--r--tests/javascript/testrunner.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/javascript/testrunner.js b/tests/javascript/testrunner.js
index 020571a146..216fc7be44 100644
--- a/tests/javascript/testrunner.js
+++ b/tests/javascript/testrunner.js
@@ -49,7 +49,19 @@ page.onResourceReceived = function() {
QUnit.log(function(obj) {
if (!obj.result) {
- console.log("Test failed in module " + obj.module + ": '" + obj.name + "' \nError: " + obj.message + " \nActual: " + obj.actual + " \nExpected: " + obj.expected + ' \nSource: ' + obj.source + "\n\n");
+ var errorMessage = "Test failed in module " + obj.module + ": '" + obj.name + "' \nError: " + obj.message;
+
+ if (obj.actual) {
+ errorMessage += " \nActual: " + obj.actual;
+ }
+
+ if (obj.expected) {
+ errorMessage += " \nExpected: " + obj.expected;
+ }
+
+ errorMessage += " \nSource: " + obj.source + "\n\n";
+
+ console.log(errorMessage);
}
});