title: Babel Config Error: Support for the experimental syntax 'jsx' isn't currently enabled
body: <p>I am trying to make unit tests with Jest for my <code>reactjs</code> project.</p>
  <p>When I want to test the rendering of a component, I am getting the following error :</p>
  <pre class="lang-sh prettyprint-override"><code>SyntaxError: /Users/jk/EpitechProjects/T-WEB-700/CountOfMoney_18/front/src/tests/components/Navbar.test.js: 
  Support for the experimental syntax 'jsx' isn't currently enabled (9:29):
  
         7 | 
         8 | test('Navbar : should render navbar', ()=&gt;{
      &gt;  9 |     const wrapper = shallow(&lt;Navbar /&gt;);
           |                             ^
        10 |     expect(wrapper.find('nav').length).toBe(1);
  
  Add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of
  your Babel config to enable transformation. If you want to leave it as-is,
  add @babel/plugin-syntax-jsx (https://git.io/vb4yA) to the 'plugins' section to 
  enable parsing.
  </code></pre>
  <p>However, it does not seem to recognize the <code>JSX</code> syntax.<br/>
  I have tried both <code>@babel/preset-react</code> and <code>@babel/plugin-syntax-jsx</code> suggestions , but the same error remains.</p>
  <p>Here are a few of my config files :</p>
  <p>jest.config.json</p>
  <pre class="lang-sh prettyprint-override"><code>{
      &quot;setupFiles&quot;: [
          &quot;raf/polyfill&quot;,
          &quot;&lt;rootDir&gt;/src/setupTests.js&quot;
      ],
      &quot;transform&quot;: {
          &quot;^.+\\.(js?)$&quot;: &quot;babel-jest&quot;
        }
  }
  </code></pre>
  <p>babel.config.js</p>
  <pre class="lang-sh prettyprint-override"><code>module.exports = {
      presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
    };
  </code></pre>
  <p>setupTests.js</p>
  <pre class="lang-js prettyprint-override"><code>//import '@testing-library/jest-dom';
  import Enzyme from 'enzyme';
  import Adapter from 'enzyme-adapter-react-16';
  
  Enzyme.configure({
      adapter: new Adapter()
  });
  </code></pre>
  <p>package.json</p>
  <pre class="lang-sh prettyprint-override"><code>{
    &quot;name&quot;: &quot;front&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      ...
      &quot;@testing-library/jest-dom&quot;: &quot;^5.11.6&quot;,
      &quot;@testing-library/user-event&quot;: &quot;^12.2.2&quot;,
      ...
      &quot;babel&quot;: &quot;^6.23.0&quot;,
      ...
      &quot;react&quot;: &quot;^17.0.1&quot;,
      &quot;react-dom&quot;: &quot;^17.0.1&quot;,
      ...
      &quot;react-scripts&quot;: &quot;4.0.0&quot;,
      &quot;react-test-renderer&quot;: &quot;^17.0.1&quot;,
      ...
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;react-scripts start&quot;,
      &quot;build&quot;: &quot;react-scripts build&quot;,
      &quot;test&quot;: &quot;react-scripts test&quot;,
      &quot;eject&quot;: &quot;react-scripts eject&quot;,
      &quot;testJ&quot;: &quot;jest --config=jest.config.json&quot;
    },
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: [
        &quot;react-app&quot;,
        &quot;react-app/jest&quot;
      ]
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    },
    &quot;devDependencies&quot;: {
      &quot;@babel/plugin-syntax-jsx&quot;: &quot;^7.12.1&quot;,
      &quot;@babel/preset-react&quot;: &quot;^7.12.10&quot;,
      &quot;@testing-library/react&quot;: &quot;^11.2.2&quot;,
      &quot;enzyme&quot;: &quot;^3.11.0&quot;,
      &quot;enzyme-adapter-react-16&quot;: &quot;^1.15.5&quot;,
      &quot;jest&quot;: &quot;^26.6.3&quot;
  </code></pre>