title: Using Istanbul and Mocha to cover ES6 code
body: <p>I have Node code, written in ES6, that I test by issuing <code>mocha --harmony</code>.
  Tests are fine - everything works.</p>
  
  <p>Now I want to add coverage and istanbul to the mix, but I keep getting errors on the first arrow function encountered:</p>
  
  <pre><code>No coverage information was collected, exit without writing coverage information
  c:\Users\Guy\Code\alpha-dev\tests\helpers.js:12
      setTimeout(() =&gt; {
                  ^
  SyntaxError: Unexpected token )
      at exports.runInThisContext (vm.js:73:16)
      at Module._compile (module.js:443:25)
      at Module._extensions..js (module.js:478:10)
      at Object.Module._extensions..js (c:\Users\Guy\Code\alpha-dev\node_modules\istanbul\lib\hook.js:101:13)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)
      at Module.require (module.js:365:17)
  </code></pre>
  
  <p>Here's what I tried:</p>
  
  <ol>
  <li>Installed istanbul-harmony (from git://github.com/gotwarlost/istanbul.git#harmony) as my dev dependency.</li>
  <li>Running the following command: <code>"./node_modules/.bin/istanbul" cover "./node_modules/mocha/bin/_mocha" -- --harmony tests -R spec</code></li>
  <li>Combinations on flags for both istanbul and _mocha</li>
  </ol>
  
  <p>How can I run istanbul to cover tests written using ES6 features? What am I missing?</p>