Permalink
Browse files

Integrated colorized output

  • Loading branch information...
1 parent 239aa7d commit 78818fe50b445938867acd102b1382e60a5689ad @lukebayes committed Feb 16, 2011
Showing with 17 additions and 8 deletions.
  1. +0 −8 src/node_should/printer.js
  2. +17 −0 test/fake_printer.js
@@ -76,26 +76,18 @@ Printer.prototype._printInfo = function(message) {
}
Printer.prototype._printSuccess = function(message) {
- //TODO(lukebayes) Decorate this message with ascii chars
- //to turn it green in a terminal.
this.out.write(style.green(message));
}
Printer.prototype._printFailure = function(message) {
- //TODO(lukebayes) Decorate this message with ascii chars
- //to turn it red in a terminal.
this.out.write(style.red(message));
}
Printer.prototype._printError = function(message) {
- //TODO(lukebayes) Decorate this message with ascii chars
- //to turn it red in a terminal.
this.out.write(style.red(message));
}
Printer.prototype._printIgnore = function(message) {
- //TODO(lukebayes) Decorate this message with ascii chars
- //to turn it yellow in a terminal.
this.out.write(style.yellow(message));
}
View
@@ -14,5 +14,22 @@ var FakePrinter = function() {
util.inherits(FakePrinter, Printer);
+// Override colorized methods so that our tests can be a little simpler.
+FakePrinter.prototype._printSuccess = function(message) {
+ this.out.write(message);
+}
+
+FakePrinter.prototype._printFailure = function(message) {
+ this.out.write(message);
+}
+
+FakePrinter.prototype._printError = function(message) {
+ this.out.write(message);
+}
+
+FakePrinter.prototype._printIgnore = function(message) {
+ this.out.write(message);
+}
+
exports.FakePrinter = FakePrinter;

0 comments on commit 78818fe

Please sign in to comment.