title: Adding i18n with Typescript and Jest, getting "All files must be modules when the '--isolatedModules' error"
body: <p>I'm trying to properly mock my i18n file with typescript and jest but I keep getting this error when I run the test: </p>
  
  <pre><code>  TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
      __tests__/__mock__/react-i18next.ts:1:1 - error TS1208: All files must be modules when the '--isolatedModules' flag is provided.
  
      1 jest.mock('i18next', () =&gt; ({
  </code></pre>
  
  <p>react-i18next.ts:</p>
  
  <pre><code>jest.mock('i18next', () =&gt; ({
    use: () =&gt; {
      return {
        init: () =&gt; { }
      };
    },
    t: k =&gt; k
  }));
  </code></pre>
  
  <p>My jest.config:</p>
  
  <pre><code>module.exports = {
    verbose: true,
    roots: ["&lt;rootDir&gt;"],
    testRegex: "/__tests__/.*\\.(test|spec)\\.tsx?",
    transform: {
      "^.+\\.tsx?$": "ts-jest",
    },
    moduleNameMapper: {
      "react-i18next": "&lt;rootDir&gt;/__tests__/__mock__/react-i18next.ts"
    },
  };
  </code></pre>
  
  <p>i18n.ts</p>
  
  <pre><code>import i18n from "i18next";
  import {initReactI18next} from "react-i18next";
  import english from "./locales/en/common.json";
  import french from "./locales/fr/common.json";
  
  i18n.use(initReactI18next).init({
    lng: 'en',
    resources: {
      fr: {
        translation: french,
      },
      en: {
        translation: english,
      },
    },
    interpolation: {
      escapeValue: false,
    },
    fallbackLng: ["en"]
  });
  
  export default i18n;
  </code></pre>