How does jest --findRelatedTests work under the hood? : <blockquote>
  <p>Find and run the tests that cover a space separated list of source
  files that were passed in as arguments. Useful for pre-commit hook
  integration to run the minimal amount of tests necessary.</p>
</blockquote>

<p>This is in official docs, but how does this work? Does it analyze all the imports in my project and only runs tests that import the file I want to test? That's how I would write it, but is it really working like that?</p>

<p>Related question-does it use a cache when finding related tests?</p>
