title: Jest TypeError: Cannot read property 'bind' of undefined in JestAdapter
body: <pre><code>Test suite failed to run
  
            TypeError: Cannot read property 'bind' of undefined
        at jestAdapter (node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:30:56)
  </code></pre>
  <p><strong>Steps to reproduce the behavior:</strong></p>
  <p><strong>Dependencies</strong></p>
  <pre><code>&quot;jest&quot;: &quot;^27.0.6&quot;,
  &quot;ts-jest&quot;: &quot;^27.0.4&quot;,
  </code></pre>
  <p><strong>Jest configuration</strong></p>
  <pre><code>&quot;jest&quot;: {
  &quot;runner&quot;: &quot;@jest-runner/electron&quot;,
  &quot;testEnvironment&quot;: &quot;@jest-runner/electron/environment&quot;,
  &quot;moduleNameMapper&quot;: {
  &quot;\.(jpg|jpeg|png|gif|svg|yaml)$&quot;: &quot;/mocks/fileMock.js&quot;,
  &quot;\.(css|less|scss)$&quot;: &quot;/mocks/styleMock.js&quot;
  },
  &quot;modulePaths&quot;: [
  &quot;/src/&quot;,
  &quot;node_modules&quot;
  ],
  &quot;preset&quot;: &quot;ts-jest&quot;,
  &quot;transform&quot;: {
  &quot;^.+\.(ts|tsx)?$&quot;: &quot;ts-jest&quot;,
  &quot;^.+\.(js|jsx)$&quot;: &quot;babel-jest&quot;
  }
  },
  </code></pre>
  <p><strong>Babelrc</strong></p>
  <pre><code>{
  &quot;presets&quot;: [&quot;@babel/preset-env&quot;, &quot;@babel/preset-react&quot;, &quot;@babel/preset-typescript&quot;],
  &quot;plugins&quot;: [[&quot;@babel/plugin-proposal-decorators&quot;, { &quot;legacy&quot;: true }],[&quot;@babel/plugin-proposal-class-properties&quot;, { &quot;loose&quot;: true }]]
  }
  </code></pre>
  <p>The jest looks broken with latest upgrades and there is no proper fix on a particular issue. Every fix leading to one more bug open.</p>
  <blockquote>
  <p>So far these many errors have been identified.</p>
  </blockquote>
  <ul>
  <li>Import Errors - Jest not able to import</li>
  <li>Cannot read property 'app' of undefined</li>
  <li>TypeError: Jest: a transform must export a process function.</li>
  <li>TypeError: Cannot read property 'bind' of undefined</li>
  </ul>
  <p><strong>Environment:</strong></p>
  <blockquote>
  <p>Node version: v12.17.0
  NPM version: 6.14.4</p>
  </blockquote>
  <p>What is the proper configuration and what am i missing?</p>
  <p><code>runtime.setGlobalsForRuntime</code> is undefined hence <code>bind</code> is also <strong>undefined</strong>. Should we set <code>setGlobalsForRuntime</code> or is this because of some missing config?</p>