* Let Jest handle all file types
* Update regexes
* Fix exclusion regex to also exclude files without extension
* Be over-cautious with Windows paths because I'm not sure how Jest handles them
* There is no automatic babel-jest discovery now that we use transsform
In my tests, jsdom was throwing a "SecurityError" at HistoryImpl._sharedPushAndReplaceState (node_modules/react-scripts/node_modules/jsdom/lib/jsdom/living/window/History-impl.js:87:15)
This happens because document.URL defaults to "about:blank". Unfortunately, if you interact with the History object it tries and fails to parse the URL, causing a "SecurityError" to be thrown. Setting the default URL to "http://localhost" fixes this issue.
Jest matches moduleNameMapper regexes with module names, not the full
file path, so the negative lookahead doesn’t work for filtering out
JS files, because they can be imported without the extension. So paths
like `lodash.assign` and `../utils/range` were mislabeled as resources
with unknown file extensions because they have a dot in the name.
As a stopgap measure, revert the moduleNameMapper regex added in #1077.
* Replace `scriptPreprocessor` config with `transform`.
* Also remove `moduleFileExtensions` which has been redundant since 16.0
(`['js', 'json', 'jsx', 'node’]` is the default)