summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter 'Pita' Martischka <petermartischka@googlemail.com>2012-11-03 13:20:44 +0000
committerPeter 'Pita' Martischka <petermartischka@googlemail.com>2012-11-03 13:20:44 +0000
commit90e10146883e0b7a3a06ef14fc05d20874611865 (patch)
tree3ee39389b6c6c27147f8892b62930e8915bdd7c4
parent67f12493ed186176755ea59eea53c18e612b1838 (diff)
downloadetherpad-lite-90e10146883e0b7a3a06ef14fc05d20874611865.zip
Colors :)
-rw-r--r--tests/frontend/runner.js6
-rw-r--r--tests/frontend/travis/remote_runner.js7
2 files changed, 9 insertions, 4 deletions
diff --git a/tests/frontend/runner.js b/tests/frontend/runner.js
index 5ecd0c69..76004a8e 100644
--- a/tests/frontend/runner.js
+++ b/tests/frontend/runner.js
@@ -45,9 +45,9 @@ $(function(){
runner.on('test end', function(test){
if ('passed' == test.state) {
- append("->","PASSED :", test.title);
+ append("->","[green]PASSED[clear] :", test.title);
} else if (test.pending) {
- append("->","PENDING:", test.title);
+ append("->","[yellow]PENDING[clear]:", test.title);
} else {
var err = test.err.stack || test.err.toString();
@@ -65,7 +65,7 @@ $(function(){
err += "\n(" + test.err.sourceURL + ":" + test.err.line + ")";
}
- append("->","FAILED :", test.title, err);
+ append("->","[red]","FAILED :", test.title, err, "[clear]");
}
});
diff --git a/tests/frontend/travis/remote_runner.js b/tests/frontend/travis/remote_runner.js
index 6ff85c26..6140782c 100644
--- a/tests/frontend/travis/remote_runner.js
+++ b/tests/frontend/travis/remote_runner.js
@@ -41,7 +41,12 @@ browserChain.init(enviroment).get("http://localhost:9001/tests/frontend/", funct
return;
}
var newText = consoleText.substr(knownConsoleText.length);
- newText.length > 0 && console.log(newText.replace(/\n$/, ""));
+ newText = newText.replace(/\[red\]/g,'\x1B[31m').replace(/\[yellow\]/g,'\x1B[33m')
+ .replace(/\[green\]/g,'\x1B[32m').replace(/\[clear\]/g, '\x1B[39m');
+
+ if(newText.length > 0){
+ console.log(newText.replace(/\n$/, ""))
+ }
knownConsoleText = consoleText;
if(knownConsoleText.indexOf("FINISHED") > 0){