From f9f5af8d5fe9ddae0bed612a756c51ce75f589b1 Mon Sep 17 00:00:00 2001 From: "Christian G. Warden" Date: Fri, 14 Aug 2015 08:47:00 -0700 Subject: [PATCH] Fix Collapsed Output Fix collapsed output to write to the stream passed rather than always writing to stdout. Call passed callback when done. --- lib/output-collapsed.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/output-collapsed.js b/lib/output-collapsed.js index d3758ae..fc6eb9a 100644 --- a/lib/output-collapsed.js +++ b/lib/output-collapsed.js @@ -22,6 +22,7 @@ exports.emit = function emitCollapsed(args, callback) 'required "output" argument must be a function'); args.stacks.eachStackByCount(function (frames, count) { - process.stdout.write(frames.join(',') + ' ' + count + '\n'); + args.output.write(frames.join(',') + ' ' + count + '\n'); }); + callback(); };