From da5d6ff649176a285768aee5792776ff21f689a6 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Fri, 3 Jan 2014 17:52:43 -0800 Subject: [PATCH] Fix mocha_phantomjs task to not buffer output --- Gruntfile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 2358ec0e..953d6e8d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -147,10 +147,11 @@ module.exports = function(grunt) { // Alias the `mocha_phantomjs` task to run `mocha-phantomjs` grunt.registerTask('mocha_phantomjs', 'mocha-phantomjs', function () { var done = this.async(); - require('child_process').exec('node_modules/mocha-phantomjs/bin/mocha-phantomjs ./test/ci-tests.html', function (err, stdout) { - grunt.log.write(stdout); + var mocha = require('child_process').exec('node_modules/mocha-phantomjs/bin/mocha-phantomjs ./test/ci-tests.html', function (err) { done(err); }); + mocha.stdout.pipe(process.stdout); + mocha.stderr.pipe(process.stderr); }); // Test/Dev tasks