title: method render from testing-library/react dont match with my component with typescript
body: <p>I'm trying to use jest/testing library to make a test in my nextJS application and when I put a component inside the render method, it complains, is my first time using jest/react test in next, I follow the documentation but it still do not work:</p>
  <p>the error:</p>
  <pre><code>SyntaxError: C:\Users\gabri\OneDrive\Documentos\nextJS\no_role\src\tests\index.spec.ts: Unexpected token, expected &quot;,&quot; (7:21)     
  
         5 |
         6 |     it ('Should open home', () =&gt; {
      &gt;  7 |         render(&lt;MyApp/&gt;)
           |                      ^
         8 |     })
         9 | });
        10 |
  
        at Object._raise (node_modules/@babel/parser/src/parser/error.js:147:45)
        at Object.raiseWithData (node_modules/@babel/parser/src/parser/error.js:142:17)
        at Object.raise (node_modules/@babel/parser/src/parser/error.js:91:17)
        at Object.unexpected (node_modules/@babel/parser/src/parser/util.js:175:16)
        at Object.expect (node_modules/@babel/parser/src/parser/util.js:135:28)
        at Object.tsParseDelimitedListWorker (node_modules/@babel/parser/src/plugins/typescript/index.js:421:16)
        at Object.tsParseDelimitedList (node_modules/@babel/parser/src/plugins/typescript/index.js:376:14)
        at Object.tsParseBracketedList (node_modules/@babel/parser/src/plugins/typescript/index.js:448:27)
        at Object.tsParseTypeParameters (node_modules/@babel/parser/src/plugins/typescript/index.js:555:26)
        at node_modules/@babel/parser/src/plugins/typescript/index.js:2902:31
  </code></pre>
  <p>index.spect.ts:</p>
  <pre><code>import {render, screen} from '@testing-library/react';
  import MyApp from '../pages/_app'
  
  describe('New Test', () =&gt; {
  
      it ('Should open home', () =&gt; {
          render(&lt;MyApp/&gt;)
      })
  });
  
  export {};
  </code></pre>
  <p>jest.config.js:</p>
  <pre><code>module.exports = {
      testPathIgnorePatterns: ['&lt;rootDir&gt;/.next/', '&lt;rootDir&gt;/node_modules/'],
      setupFilesAfterEnv: ['&lt;rootDir&gt;/setupTests.js'],
      moduleNameMapper: {
        '^@/components/(.*)$': '&lt;rootDir&gt;/components/$1',
      },
      transform: {
        '^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { presets: ['next/babel'] }],
      },
      collectCoverageFrom: ['components/**/*.ts', 'pages/**/*.ts'],
      coverageReporters: ['lcov', 'text'],
    };
  </code></pre>
  <p>babel.config.js:</p>
  <pre><code>module.exports = {
    presets: [
      '@babel/preset-typescript',
      'next/babel'
    ]
  }
  </code></pre>
  <p>setupTest.js:</p>
  <pre><code>import '@testing-library/jest-dom';
  </code></pre>
  <p>package.json:</p>
  <pre><code>{
    &quot;name&quot;: &quot;no_role&quot;,
    &quot;private&quot;: true,
    &quot;scripts&quot;: {
      &quot;dev&quot;: &quot;next dev&quot;,
      &quot;build&quot;: &quot;next build&quot;,
      &quot;start&quot;: &quot;next start&quot;,
      &quot;lint&quot;: &quot;next lint&quot;,
      &quot;test&quot;: &quot;jest --watch&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@emotion/react&quot;: &quot;^11.7.1&quot;,
      &quot;@emotion/styled&quot;: &quot;^11.6.0&quot;,
      &quot;@material-ui/icons&quot;: &quot;^4.11.2&quot;,
      &quot;@mui/icons-material&quot;: &quot;^5.2.5&quot;,
      &quot;@mui/material&quot;: &quot;^5.2.5&quot;,
      &quot;next&quot;: &quot;12.0.7&quot;,
      &quot;primeicons&quot;: &quot;^5.0.0&quot;,
      &quot;primereact&quot;: &quot;^7.1.0&quot;,
      &quot;react&quot;: &quot;17.0.2&quot;,
      &quot;react-dom&quot;: &quot;17.0.2&quot;,
      &quot;react-lottie&quot;: &quot;^1.2.3&quot;,
      &quot;react-transition-group&quot;: &quot;^4.4.2&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@babel/preset-typescript&quot;: &quot;^7.16.7&quot;,
      &quot;@testing-library/jest-dom&quot;: &quot;^5.16.1&quot;,
      &quot;@testing-library/react&quot;: &quot;^12.1.2&quot;,
      &quot;@types/jest&quot;: &quot;^27.4.0&quot;,
      &quot;@types/react&quot;: &quot;^17.0.38&quot;,
      &quot;@types/react-lottie&quot;: &quot;^1.2.6&quot;,
      &quot;eslint&quot;: &quot;8.5.0&quot;,
      &quot;eslint-config-next&quot;: &quot;12.0.7&quot;,
      &quot;jest&quot;: &quot;^27.4.7&quot;,
      &quot;typescript&quot;: &quot;^4.5.4&quot;
    }
  }
  </code></pre>