Fix mocha_phantomjs task to not buffer output

This commit is contained in:
Robert Nelson 2014-01-03 17:52:43 -08:00
parent db80459cf1
commit da5d6ff649

View File

@ -147,10 +147,11 @@ module.exports = function(grunt) {
// Alias the `mocha_phantomjs` task to run `mocha-phantomjs` // Alias the `mocha_phantomjs` task to run `mocha-phantomjs`
grunt.registerTask('mocha_phantomjs', 'mocha-phantomjs', function () { grunt.registerTask('mocha_phantomjs', 'mocha-phantomjs', function () {
var done = this.async(); var done = this.async();
require('child_process').exec('node_modules/mocha-phantomjs/bin/mocha-phantomjs ./test/ci-tests.html', function (err, stdout) { var mocha = require('child_process').exec('node_modules/mocha-phantomjs/bin/mocha-phantomjs ./test/ci-tests.html', function (err) {
grunt.log.write(stdout);
done(err); done(err);
}); });
mocha.stdout.pipe(process.stdout);
mocha.stderr.pipe(process.stderr);
}); });
// Test/Dev tasks // Test/Dev tasks