inossidabile/grunt-contrib-testem — pull request #21 by jono-tt (2014-03-13 22:14:57+00:00)
Title: Allow reporting output file to be configured and written to after test

My Issue
------------
I had been having a few issues in trying to capture the output per testem configuration. In the Testem documentation it specifies that you should pipe the output ([here](https://github.com/airportyh/testem/blob/master/docs/use_with_jenkins.md)) from the runner into a file but the issue was that if I was running other targets as part of the build their output would obviously also get put into the output file too.

My Solution
----------------
So it got me thinking, lets try write a wrapper for the output stream so we can effectively captcha the output coming from Testem. So the solution I came up with was to override the process.stdout.write function and redirect that to write directly to the reporting file while the Testem process is running:
```
testem:
develop:
src: [ 'spec/**/*.*']
report_file: 'report.txt'
options:
launch_in_ci: ['PhantomJS']
```