Created
December 1, 2011 06:56
-
-
Save cpsubrian/1414468 to your computer and use it in GitHub Desktop.
Cakefile help. Need a better way than console.log.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exec, spawn} = require 'child_process' | |
task 'test', 'Run Mocha tests', -> | |
proc = spawn 'mocha', ['-R', 'spec', '--colors'] | |
proc.stdout.on 'data', (buffer) -> console.log buffer.toString() | |
proc.stderr.on 'data', (buffer) -> console.error buffer.toString() | |
proc.on 'exit', (status) -> | |
process.exit(1) if status != 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment