Jest – SyntaxError: Cannot use import statement outside a module
Jest doesn’t support ES6 module and hence throwing this error when you directly run the test with Jest. if you want to run like that then you have to add babel. On the other side, when you run the test with react-scripts it uses babel behind the scene to Transpile the code. In newer version … Read more