Colors :)

This commit is contained in:
Peter 'Pita' Martischka 2012-11-03 13:20:44 +00:00
parent 67f12493ed
commit 90e1014688
2 changed files with 9 additions and 4 deletions

View file

@ -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){