diff --git a/src/console/TrivialConsoleReporter.js b/src/console/TrivialConsoleReporter.js index 77e5e76..af9c7c0 100644 --- a/src/console/TrivialConsoleReporter.js +++ b/src/console/TrivialConsoleReporter.js @@ -1,19 +1,11 @@ jasmine.TrivialConsoleReporter = function(print) { - - var ansi = { - green: '\033[32m', - red: '\033[31m', - yellow: '\033[33m', - none: '\033[0m' - }; - var defaultColumnsPerLine = 50; + //inspired by mhevery's jasmine-node reporter + //https://github.com/mhevery/jasmine-node - var language = { - spec:"spec", - assertion:"assertion", - failure:"failure" - }; + var defaultColumnsPerLine = 50, + ansi = { green: '\033[32m', red: '\033[31m', yellow: '\033[33m', none: '\033[0m' }, + language = { spec:"spec", assertion:"assertion", failure:"failure" }; function coloredStr(color, str) { return ansi[color] + str + ansi.none; } @@ -35,7 +27,6 @@ jasmine.TrivialConsoleReporter = function(print) { return arr; } - function indent(str, spaces) { var lines = str.split("\n"); var newArr = [] for(var i=0; i