From 151b76c91211d42537f71f46678408568ac4eea0 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Fri, 4 Jun 2010 23:34:11 -0400 Subject: [PATCH] fuck the buffer --- lib/vows/console.js | 2 +- lib/vows/reporters/dot-matrix.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/vows/console.js b/lib/vows/console.js index cea4c47..35cddbc 100644 --- a/lib/vows/console.js +++ b/lib/vows/console.js @@ -22,7 +22,7 @@ this.puts = function (options) { return a.replace(/`([^`]+)`/g, function (_, capture) { return stylize(capture, 'italic') }) .replace(/\*([^*]+)\*/g, function (_, capture) { return stylize(capture, 'bold') }); }); - return options.stream ? options.stream.write(args.join('\n') + '\n') : buffer.push(args); + return options.stream.write(args.join('\n') + '\n'); }; }; diff --git a/lib/vows/reporters/dot-matrix.js b/lib/vows/reporters/dot-matrix.js index 24eaa0e..6e0545b 100644 --- a/lib/vows/reporters/dot-matrix.js +++ b/lib/vows/reporters/dot-matrix.js @@ -8,14 +8,13 @@ var stylize = console.stylize, // // Console reporter // -var stream, buffer, messages = []; +var stream, messages = []; this.name = 'dot-matrix'; this.report = function (data, s) { var event = data[1]; options.stream = typeof(s) === 'object' ? s : process.stdout; - buffer = []; switch (data[0]) { case 'subject': @@ -49,7 +48,6 @@ this.report = function (data, s) { break; case 'finish': if (messages.length) { - messages.pop(); // drop trailing blank message puts('\n\n' + messages.join('\n')); } else { sys.print('\n');