title: How do I test a single file using Jest?
body: <p>I am able to test multiple files using Jest, but I cannot figure out how to test a single file.</p>
  <p>I have:</p>
  <ul>
  <li>Run <code>npm install jest-cli --save-dev</code></li>
  <li>Updated <code>package.json</code>: `{ ... &quot;scripts&quot;: { &quot;test&quot;: &quot;jest&quot; } ... }</li>
  <li>Written a number of tests.</li>
  </ul>
  <p>Running <code>npm test</code> works as expected (currently it runs 14 tests).</p>
  <p>How do I test a single file, e.g. test <code>app/foo/__tests__/bar.spec.js</code>?</p>
  <p>I have tried running <code>npm test app/foo/__tests__/bar.spec.js</code> (from the project root), but I get the following error:</p>
  <blockquote>
  <p>npm ERR! Error: ENOENT, open '/node_modules/app/foo/<strong>tests</strong>/bar.spec.js/package.json'</p>
  </blockquote>