title: React.js Jest: Test suite failed to run - [closed/Resolved]
body: <p>I can't run npm test due to error:</p>
  
  <p>● Test suite failed to run</p>
  
  <pre><code>/home/nrl/repo/frontend/node_modules/react-router-dom/es/Link.js:11
  import React from 'react';
         ^^^^^
  
  SyntaxError: Unexpected identifier
  </code></pre>
  
  <p>Here is my test file. </p>
  
  <pre><code>import React from 'react';
  
  import { Footer } from "../components/Footer";
  
  function sum(a, b) {
    return a + b;
  }
  
  test('adds 1 + 2 to equal 3', () =&gt; {
    expect(sum(1, 2)).toEqual(3);
  });
  </code></pre>
  
  <p>This is Footer.js</p>
  
  <pre><code>import React from 'react'
  import Link from "react-router-dom/es/Link"
  
  export const Footer = () =&gt;{
      return(
          &lt;footer&gt;
               ...
          &lt;/footer&gt;
      )
  };
  </code></pre>
  
  <p>Problem seems like about react-router-dom/es/Link. 
  Because it fixes if I remove import Link line from footer.js file.
  Can't I test components like this ?</p>