title: Why am I getting 0 coverage from Jest when running it from npm?
body: <p>I'm trying to get code coverage numbers for a single Vue component, using Jest.</p>
  
  <p>Let's say my component is <code>/var/www/html/path/to/Component.vue</code> and its corresponding unit test file is <code>/var/www/html/path/to/tests/unit/Component.spec.js</code></p>
  
  <p>In my <code>package.json</code> I have the following script:</p>
  
  <pre><code>"scripts": {
      "test": "jest --no-cache"
  }
  </code></pre>
  
  <p>When I run Jest to get coverage only for my component like so:</p>
  
  <pre class="lang-sh prettyprint-override"><code>npm test -- "/var/www/html/path/to/tests/unit/Component.spec.js" "--coverage" "--collectCoverageFrom=/var/www/html/path/to/Component.vue"
  
  </code></pre>
  
  <p>I get zero code coverage numbers:</p>
  
  <pre><code>=============================== Coverage summary ===============================
  Statements   : Unknown% ( 0/0 )
  Branches     : Unknown% ( 0/0 )
  Functions    : Unknown% ( 0/0 )
  Lines        : Unknown% ( 0/0 )
  ================================================================================
  Test Suites: 1 passed, 1 total
  Tests:       3 passed, 3 total
  Snapshots:   0 total
  Time:        4.019s
  </code></pre>
  
  <p><strong>Why am I getting this result and how can I get the real code coverage statistics from Jest via npm</strong>?</p>