title: Jest module not defined
body: <p>I'm writing my first package and I just converted it to be TypeScript compatible, but this somehow affected my GitHub workflow. When I run my tests using Jest locally, they work just fine. When my tests are run on GitHub, it succeeds for <code>10.x</code>, but not <code>12.x</code> or <code>14.x</code>, giving me the following error:</p>
  <pre class="lang-none prettyprint-override"><code>(node:2397) ExperimentalWarning: The ESM module loader is experimental.
  ReferenceError: module is not defined
      at file:///home/runner/work/enhancedMathJS/enhancedMathJS/jest.config.js:1:1
      at ModuleJob.run (internal/modules/esm/module_job.js:146:37)
      at async Loader.import (internal/modules/esm/loader.js:182:24)
      at async readConfigFileAndSetRootDir (/home/runner/work/enhancedMathJS/enhancedMathJS/node_modules/jest-config/build/readConfigFileAndSetRootDir.js:126:32)
      at async readConfig (/home/runner/work/enhancedMathJS/enhancedMathJS/node_modules/jest-config/build/index.js:217:18)
      at async readConfigs (/home/runner/work/enhancedMathJS/enhancedMathJS/node_modules/jest-config/build/index.js:406:26)
      at async runCLI (/home/runner/work/enhancedMathJS/enhancedMathJS/node_modules/@jest/core/build/cli/index.js:230:59)
      at async Object.run (/home/runner/work/enhancedMathJS/enhancedMathJS/node_modules/jest/node_modules/jest-cli/build/cli/index.js:163:37)
  npm ERR! Test failed.  See above for more details.
  enhancedmath@2.0.0 test /home/runner/work/enhancedMathJS/enhancedMathJS
  jest
  </code></pre>
  <h3>File <em>jest.config.js</em></h3>
  <pre class="lang-js prettyprint-override"><code>module.exports = {
    preset: 'ts-jest',
    testEnvironment: 'node',
    testMatch: ['&lt;rootDir&gt;/**/__tests__/**/*.spec.ts'],
    testPathIgnorePatterns: ['/node_modules/'],
    coverageDirectory: './test-reports',
    coveragePathIgnorePatterns: ['node_modules', 'src/database', 'src/test', 'src/types'],
    reporters: ['default', 'jest-junit'],
    globals: { 'ts-jest': { diagnostics: false } },
  };
  </code></pre>
  <h3>Workflow</h3>
  <pre class="lang-yaml prettyprint-override"><code>name: Node.js CI
  
  on:
    push:
      branches: [ master ]
    pull_request:
      branches: [ master ]
  
  jobs:
    build:
  
      runs-on: ubuntu-latest
  
      strategy:
        matrix:
          node-version: [10.x, 12.x, 14.x]
  
      steps:
      - uses: actions/checkout@v2
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - run: npm ci
      - run: npm test
  </code></pre>
  <p>I don't understand what the problem is, since everything works locally, but not for every version of Node.js on GitHub.</p>
  <p>If you want to check out the files and errors for yourself, you can find my repository <a href="https://github.com/MoutPessemier/enhancedMathJS" rel="noreferrer">here</a>.</p>