title: Grunt-Mocha-Test BlanketJS Coverage
body: <p>I'm trying to setup code coverage with with grunt-mocha-test plugin for GruntJS. I have followed <a href="https://github.com/pghalliday/grunt-mocha-test" rel="nofollow">this guide</a>, under the section 'Generating Coverage'.</p>
  
  <p>However, running grunt produces a coverage.html report that only has coverage for the test files that were run... not my other code.</p>
  
  <p>So:</p>
  
  <ol>
  <li>Does anyone know what the issue is? Ideally I do not want to use another grunt plugin.</li>
  <li>How do I filter all my <code>/test/**</code> files to not be included in the coverage report?</li>
  </ol>
  
  <p>My normal mocha tests run fine via grunt, just the coverage report is the problem.</p>
  
  <p>The documentation for BlanketJS doesn't really help here. Perhaps there is something in the 'options' part when requiring blanker?</p>
  
  <p>Any here is my gruntfile:</p>
  
  <pre><code>mochaTest: {
              test: {
                  src: watchFiles.mochaTests,
                  options: {
                      reporter: 'spec',
                      require: ['server.js', 'app/tests/blanket.js']
                  }
              },
              coverage: {
                  src: watchFiles.mochaTests,
                  options: {
                      reporter: 'html-cov',
                      // use the quiet flag to suppress the mocha console output
                      quiet: true,
                      // specify a destination file to capture the mocha
                      // output (the quiet option does not suppress this)
                      captureFile: 'coverage.html'
                  }
              }
          },
  </code></pre>
  
  <p>And here is the blanketjs wrapper:</p>
  
  <pre><code>var path = require('path');
  var srcDir = path.join(__dirname, '..');
  
  require('blanket')({
      // Only files that match the pattern will be instrumented
      pattern: srcDir
   });
   console.log(srcDir); 
  </code></pre>
  
  <p>The <code>src: watchFiles.mochaTests</code> is just a variable above holding an array of my tests to run.</p>