title: typescript - jest - tsconfig : Cannot find module '../...' at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:259:17)
body: <p>I am using :</p>
  <ul>
  <li>vscode v1.49.2</li>
  <li>jest runner v0.4.24 extension</li>
  <li>node : 14.10.1</li>
  <li>win10 : 64 bits</li>
  </ul>
  <pre><code>&quot;devDependencies&quot;: {
          &quot;@types/jest&quot;: &quot;24.0.23&quot;,
          &quot;@types/jest-when&quot;: &quot;2.7.0&quot;,
          &quot;jest&quot;: &quot;24.9.0&quot;,
          &quot;jest-cli&quot;: &quot;24.9.0&quot;,
          &quot;jest-coverage-badges&quot;: &quot;1.1.2&quot;,
          &quot;jest-create-mock-instance&quot;: &quot;1.1.0&quot;,
          &quot;jest-html-reporter&quot;: &quot;^3.1.2&quot;,
          &quot;jest-jenkins-reporter&quot;: &quot;1.0.2&quot;,
          &quot;jest-junit-reporter&quot;: &quot;1.1.0&quot;,
          &quot;jest-when&quot;: &quot;2.7.0&quot;,
          &quot;typescript&quot;: &quot;^3.8.3&quot;
      },
  </code></pre>
  <p><strong>The issue :</strong> Jest can't resolve relative path</p>
  <p>Cannot find module '../../common/utility/json.utility' from 'command.test.ts'</p>
  <blockquote>
  <p>1 | import { JsonUtility } from '../../common/utility/json.utility';
  | ^</p>
  </blockquote>
  <p>at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:259:17)
  at Object. (test/command/poll/command.test.ts:1:1)</p>
  <p>My configs :</p>
  <p>**jest.config.js : ** The details</p>
  <pre><code>module.exports = {
      verbose: true,
      transform: {
          '^.+\\.tsx?$': 'ts-jest'
      },
      testEnvironment: 'node',
      testRegex: '(/test/.*|(\\.|/)(test|spec))(\\.it)?\\.(jsx?|tsx?)$',
      testPathIgnorePatterns: ['/coverage', '/lib', '/test/fixture'],
      testResultsProcessor: './node_modules/jest-junit-reporter',
      moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
      coverageThreshold: {
          global: {
              branches: 15, // 80
              functions: 15, // 80
              lines: 15, // 80
              statements: 0 // 20
          }
      },
      collectCoverageFrom: ['src/**/*.ts', '!src/index.ts'],
      coverageReporters: ['json-summary', 'text', 'lcov']
  };
  </code></pre>
  <p><strong>tsconfig.json :</strong> The details of the tsconfig</p>
  <pre><code>{
      &quot;compilerOptions&quot;: {
          &quot;target&quot;: &quot;es6&quot;,
          &quot;module&quot;: &quot;commonjs&quot;,
          &quot;lib&quot;: [
              &quot;es6&quot;,
              &quot;esnext&quot;
          ],
          &quot;declaration&quot;: true,
          &quot;sourceMap&quot;: true,
          &quot;outDir&quot;: &quot;lib&quot;,
          &quot;rootDirs&quot;: [
              &quot;src&quot;,
              &quot;test&quot;
          ],
          &quot;removeComments&quot;: true,
          &quot;strict&quot;: true,
          &quot;noImplicitAny&quot;: true,
          &quot;moduleResolution&quot;: &quot;node&quot;,
          &quot;strictNullChecks&quot;: true,
          &quot;resolveJsonModule&quot;: true,
          &quot;esModuleInterop&quot;: true,
          &quot;experimentalDecorators&quot;: true,
          &quot;emitDecoratorMetadata&quot;: true
      },
      &quot;exclude&quot;: [
          &quot;typedoc&quot;,
          &quot;**/*.d.ts&quot;,
          &quot;node_modules&quot;,
          &quot;**/node_modules/*&quot;,
          &quot;lib&quot;
      ]
  }
  </code></pre>
  <p>Best Regards</p>