title: importing images and joi schema object breaks my jest tests
body: <p>Here are the following errors:</p>
  <pre><code>    SyntaxError: Invalid or unexpected token
  
        17 | } from &quot;../../app/utilityfunctions&quot;;
        18 | import Image from &quot;next/image&quot;;
      &gt; 19 | import mdpLogo from &quot;../../public/mdpLogo.png&quot;;
  </code></pre>
  <p>this is for the Joi object:</p>
  <pre><code>    export const ingredientSchema = Joi.object({
      ^^^^^^
  
      SyntaxError: Unexpected token 'export'
  
        17 | import { useRouter } from &quot;next/router&quot;;
        18 | import { useGetCurrentUsersProfile } from &quot;../../app/utilityfunctions&quot;;
      &gt; 19 | import { diarySchema } from &quot;../../functions/src/foodRelatedSchemas&quot;;
  </code></pre>
  <p>I tried to use this question answer:</p>
  <p><a href="https://stackoverflow.com/questions/46898638/importing-images-breaks-jest-test">Importing images breaks jest test</a></p>
  <p>But it didnt work.</p>
  <p>Here is what I did for image:</p>
  <p>Added this line to my package.json:</p>
  <pre><code>&quot;jest&quot;: {
   &quot;moduleNameMapper&quot;: {
        &quot;\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$&quot;: &quot;&lt;rootDir&gt;/mocks/fileMock.js&quot;,
        &quot;\\.(css|less)$&quot;: &quot;&lt;rootDir&gt;/mocks/fileMock.js&quot;
      }
  }
  </code></pre>
  <p>created <code>mocks</code> folder added <code>fileMock.js</code> and copy pasted this <code>export default &quot;&quot;;</code></p>
  <p>Result: Same errors</p>
  <p>Please help me, I can't do anything, I don't understand what is going on?</p>