<!-- PLEASE READ THE FIRST SECTION :-) --> ### Is this a bug report? Yes <!-- If you answered "Yes": Please note that your issue will be fixed much faster if you spend about half an hour preparing it, including the exact reproduction steps and a demo. If you're in a hurry or don't feel confident, it's fine to report bugs with less details, but this makes it less likely they'll get fixed soon. In either case, please fill as many fields below as you can. If you answered "No": If this is a question or a discussion, you may delete this template and write in a free form. Note that we don't provide help for webpack questions after ejecting. You can find webpack docs at https://webpack.js.org/. --> ### Environment <!-- To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required. This enables the maintainers quickly reproduce the issue and give feedback. Run the following command in your React app's folder in terminal. Note: The result is copied to your clipboard directly. `npx create-react-app --info` Paste the output of the command in the section below. --> ``` Environment: OS: macOS High Sierra 10.13.6 Node: 10.8.0 Yarn: 1.10.1 npm: 6.2.0 Watchman: 4.9.0 Xcode: Xcode 10.0 Build version 10A255 Android Studio: Not Found Packages: (wanted => installed) react: ~16.5.0 => 16.5.2 react-dom: ~16.5.0 => 16.5.2 react-scripts: ^2.0.1 => 2.0.1 ``` ### Steps to Reproduce <!-- How would you describe your issue to someone who doesn’t know you or your project? Try to write a sequence of steps that anybody can repeat to see the issue. --> 1. Add any module via git (test one: [z-ax/test-next-module](https://github.com/z-ax/test-next-module)) 2. Add there a valid JS file which has `import something from 'something'` 3. Add a simple valid test which uses a file from this module (test one: [z-ax/test-next](https://github.com/z-ax/test-next)) 4. Run `react-scripts build` (all good) 5. Run `react-scripts test --verbose` (test with this import fails) ### Expected Behavior <!-- How did you expect the tool to behave? It’s fine if you’re not sure your understanding is correct. Just write down what you thought would happen. --> Build passes. Test passes. ### Actual Behavior <!-- Did something go wrong? Is something broken, or not behaving as you expected? Please attach screenshots if possible! They are extremely helpful for diagnosing issues. --> Build passes. Test fails because of `SyntaxError: Unexpected identifier`, pointing to `import`. Linking with #5103.