title: Use scoped packages with Jest
body: <p>I am developing an app with react-native and typescript and doing the tests with Jest, but I have a problem when I use scoped packages (@assets), jest can not find the path and gives error.</p>
  
  <p>The directory structure looks like this:</p>
  
  <pre><code>project/
    assets/
      img/
        foo.png
      package.json
    src/
      Foo.ts
    build/
      Foo.js
  
  
  // assets/package.json
  {
    "name": "@assets" // My @assets scope
  }
  
  // build/Foo.js
  const image = require('@assets/img/foo.png'); // &lt;- error in Jest
  </code></pre>
  
  <p>So when I run the jest:  </p>
  
  <blockquote>
    <p>npm run jest build/</p>
  </blockquote>
  
  <p>It can not find '@assets/img/foo.png' and throws the error: </p>
  
  <blockquote>
    <p>Cannot find module '@assets/img/logo.png' from 'Foo.js'</p>
  </blockquote>
  
  <p>How can I use scope package in Jest?</p>
  
  <p>Jest version: 20.0.4</p>
  
  <p>thanks</p>