title: Preact + Jest: "moduleNameMapper" and "moduleDirectories" configs not registering
body: <p>I'm trying to set up a project with Preact, Parcel, Typescript, and Jest. I have the following in my <code>package.json</code> in order to use absolute paths for my imports:</p>
  
  <pre><code>"alias": {
    "src": "./src"
  },
  </code></pre>
  
  <p>This lets me import my files like <code>import sum from 'src/math/sum';</code> instead of for example, <code>import sum from '../../../math/sum';</code>. This all works when actually building and running the page, but when running the tests with Jest, I get an error: <code>Cannot find module 'src/math/sum' or its corresponding type declarations.</code> After perusing other stackoverflow questions, I tried using the "moduleDirectories" and "moduleNameMapper" Jest configuration fields to make the aliases work in Jest, but the error never changed.</p>
  
  <p>Here is my Jest configuration (in package.json):</p>
  
  <pre><code>"jest": {
      "clearMocks": true,
      "coverageDirectory": "coverage",
      "moduleDirectories": ["node_modules", "./"],
      "moduleNameMapper": {
          "^src[/](.+)": "&lt;rootDir&gt;/src/$1",
          "src/([^\\.]*)$": "&lt;rootDir&gt;/src/$1"
      },
      "testEnvironment": "node",
      "transform": {
          "^.+\\.tsx?$": "ts-jest"
      }
  },
  </code></pre>
  
  <p>Here's my tsconfig.js:</p>
  
  <pre><code>{
      "compilerOptions": {
          "outDir": "./dist",
          "sourceMap": true,
          "noImplicitAny": true,
          "module": "es6",
          "moduleResolution": "node",
          "esModuleInterop": true,
          "target": "es6",
          "jsx": "react",
          "jsxFactory": "h"                                      
      },
      "include": ["./src/**/*"]
  }
  </code></pre>
  
  <p>And here are my package versions:</p>
  
  <pre><code>"dependencies": {
      "preact": "^10.4.4",
      "preact-router": "^3.2.1",
      "typescript": "^3.9.3"
  },
  "devDependencies": {
      "@types/jest": "^25.2.3",
      "jest": "^26.0.1",
      "parcel-bundler": "^1.12.4",
      "ts-jest": "^26.0.0"
  }
  </code></pre>