title: using jest + typescript in monorepo
body: <p>I'm currently trying to use jest in a Typescript monorepo (not Lerna or anything just <code>baseURL</code> and <code>paths</code>, also, not my decision) and one of the files I'm testing imports a something from the monorepo.</p>
  
  <pre class="lang-js prettyprint-override"><code>
  import {publish, subscribe} from "message-bus"
  </code></pre>
  
  <p>Now in my <code>tsconfig.json</code> I have:</p>
  
  <pre><code>...
      "compilerOptions": {
          "baseUrl": "./packages",
          "paths": {
              "message-bus":["message-bus/src"],
          }, 
  ...
  </code></pre>
  
  <p>and in the package <code>jest.config.js</code>:</p>
  
  <pre class="lang-js prettyprint-override"><code>module.exports = {
  ...
    preset: 'ts-jest',
    moduleNameMapper: {
      '^message-bus/(.*)$': "../message-bus/src/$1"
    }
  ...
  }
  </code></pre>
  
  <p>Even with all this in place <code>jest</code> complains that it cannot find the module <code>message-bus</code>. Can you please help me fix my configuration?</p>