我正在使用Mocha测试我的应用程序。目前,我正在使用Makefiles,但我想切换到Cakefiles。当我通过Cake运行我的测试时,来自Mocha的颜色不会显示在控制台上。Node.js产生的颜色?
下面是一个例子:
task 'test', 'test project', (options) ->
fetchTestFiles './test', (err,files) ->
mocha = spawn 'mocha', files
mocha.stdout.pipe(process.stdout, end: false)
现在,我试着这样做:
task 'test', 'test project', (options) ->
fetchTestFiles './test', (err,files) ->
mocha = spawn 'mocha', files, customFds: [0..2]
这工作,但Node.js的文档声称customFds
已被弃用。有没有办法在不使用customFds
的情况下通过颜色?
+1 - [谷歌搜索此](http://www.google.no/search?q=node+pass+colors+through+exec)只返回您的问题... – Hubro 2012-02-04 00:10:25