title: jest, typescript and "ReferenceError: AudioBuffer is not defined"
body: <p>I use jest and the lib tonejs on my project.</p>
  <p>I can launch the test manuelly without issue, but when I launch it passing by the IDE ( Intellij, in order to debug) I have this error:</p>
  <p>&quot;ReferenceError: AudioBuffer is not defined&quot;</p>
  <p>For the record, I use a lib who use AudioBuffer, but not
  I see that AudioBuffer is a class defined in node_module/typescript/lib/lib.dom.d.ts. Any idea why jest-intellij can't go to it?</p>
  <p>Edit : the launch line:
  npx jest config=jest.config.js --runTestsByPath $PROJECT_PATH/src/character-form.component.spec.ts</p>
  <p>My test.spec.json:</p>
  <pre><code>{
    &quot;extends&quot;: &quot;./tsconfig.json&quot;,
    &quot;compilerOptions&quot;: {
      &quot;outDir&quot;: &quot;./out-tsc/spec&quot;,
      &quot;types&quot;: [
        &quot;jest&quot;,
        &quot;node&quot;,
        &quot;webpack-env&quot;
      ],
      &quot;strictNullChecks&quot;: false
    },
    &quot;exclude&quot;: [
      &quot;dist/**/*&quot;,
     &quot;node_modules/**/*&quot;
    ],
    &quot;include&quot;: [
      &quot;**/*.spec.ts&quot;,
      &quot;**/*.e2e-spec.ts&quot;,
      &quot;**/*.d.ts&quot;,
      &quot;node_modules/typescript/**/*&quot;
    ]
  }
  </code></pre>
  <p>a part of my angular.json:</p>
  <pre><code> &quot;test&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:jest&quot;,
            &quot;options&quot;: {
              &quot;main&quot;: &quot;src/test.ts&quot;,
              &quot;polyfills&quot;: &quot;src/polyfills.ts&quot;,
              &quot;tsConfig&quot;: &quot;tsconfig.spec.json&quot;,
              &quot;config&quot;: &quot;jest.config.js&quot;,
              &quot;assets&quot;: [
                &quot;src/favicon.ico&quot;,
                &quot;src/assets&quot;
              ],
              &quot;styles&quot;: [
                &quot;src/styles.css&quot;
              ],
              &quot;scripts&quot;: []
            }
          },
  </code></pre>
  <p>my tsconfig.spec.json:</p>
  <pre><code>{
    &quot;extends&quot;: &quot;./tsconfig.json&quot;,
    &quot;compilerOptions&quot;: {
      &quot;outDir&quot;: &quot;./out-tsc/spec&quot;,
      &quot;types&quot;: [
        &quot;jest&quot;,
        &quot;node&quot;,
        &quot;webpack-env&quot;
      ]
    }
  }
  </code></pre>
  <p>my tsconfig:</p>
  <pre><code>{
    &quot;compileOnSave&quot;: false,
    &quot;compilerOptions&quot;: {
      &quot;baseUrl&quot;: &quot;./&quot;,
      &quot;rootDir&quot;: &quot;./&quot;,
      &quot;outDir&quot;: &quot;./dist&quot;,
      &quot;module&quot;: &quot;commonjs&quot;,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;declaration&quot;: true,
      &quot;inlineSources&quot;: true,
      &quot;inlineSourceMap&quot;: true,
      &quot;sourceMap&quot;: false,
      &quot;noEmitOnError&quot;: true,
      &quot;noFallthroughCasesInSwitch&quot;: false,
      &quot;noImplicitAny&quot;: false,
      &quot;noImplicitThis&quot;: false,
      &quot;noUnusedParameters&quot;: false,
      &quot;noUnusedLocals&quot;: false,
      &quot;skipLibCheck&quot;: true,
      &quot;strictNullChecks&quot;: false,
      &quot;emitDecoratorMetadata&quot;: true,
      &quot;experimentalDecorators&quot;: true,
      &quot;importHelpers&quot;: true,
      &quot;target&quot;: &quot;es2017&quot;,
      &quot;typeRoots&quot;: [
        &quot;node_modules/@types&quot;
      ],
      &quot;lib&quot;: [
        &quot;es2018&quot;,
        &quot;dom&quot;
      ]
    },
    &quot;exclude&quot;: [
      &quot;dist/**/*&quot;,
      &quot;node_modules/**/*&quot;
    ]
  }
  </code></pre>