mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Colors :)
This commit is contained in:
parent
67f12493ed
commit
90e1014688
2 changed files with 9 additions and 4 deletions
|
@ -45,9 +45,9 @@ $(function(){
|
||||||
|
|
||||||
runner.on('test end', function(test){
|
runner.on('test end', function(test){
|
||||||
if ('passed' == test.state) {
|
if ('passed' == test.state) {
|
||||||
append("->","PASSED :", test.title);
|
append("->","[green]PASSED[clear] :", test.title);
|
||||||
} else if (test.pending) {
|
} else if (test.pending) {
|
||||||
append("->","PENDING:", test.title);
|
append("->","[yellow]PENDING[clear]:", test.title);
|
||||||
} else {
|
} else {
|
||||||
var err = test.err.stack || test.err.toString();
|
var err = test.err.stack || test.err.toString();
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ $(function(){
|
||||||
err += "\n(" + test.err.sourceURL + ":" + test.err.line + ")";
|
err += "\n(" + test.err.sourceURL + ":" + test.err.line + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
append("->","FAILED :", test.title, err);
|
append("->","[red]","FAILED :", test.title, err, "[clear]");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,12 @@ browserChain.init(enviroment).get("http://localhost:9001/tests/frontend/", funct
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var newText = consoleText.substr(knownConsoleText.length);
|
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;
|
knownConsoleText = consoleText;
|
||||||
|
|
||||||
if(knownConsoleText.indexOf("FINISHED") > 0){
|
if(knownConsoleText.indexOf("FINISHED") > 0){
|
||||||
|
|
Loading…
Reference in a new issue