Commit Graph

13 Commits

Author SHA1 Message Date
David
ac6a4c83fd Updated react-scripts babel-jest && jest packages to 18.0.0 (#1311) 2016-12-23 12:09:39 -08:00
Eduard Kyvenko
21b0044412 Remove path-exists from dependencies and replace it with fs.existsSync (#1289) 2016-12-18 20:57:00 +02:00
mustang
adbc1a206d Instruct Jest to load native components from RNW instead of RN (#1201) 2016-12-08 00:40:18 +00:00
Dan Abramov
5456ffff29 Let Jest handle all file types (#1197)
* 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
2016-12-07 20:28:03 +00:00
Stephen John Sorensen
aaa615f6fa Add testURL to jest config (#1120)
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.
2016-12-05 20:06:47 +00:00
Ville Immonen
715de0de6b Revert Jest moduleNameMapper regex back to a whitelist (#1149)
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.
2016-12-04 10:57:57 +02:00
Stefan
6e00813632 Adapt jest and eslint for new default loader scope. (#1077)
Revert webpack prod config comments to not refer to dev server.
2016-11-22 00:03:40 +02:00
Ville Immonen
7e9cb18a55 Upgrade Jest to 17.0 (#1078)
* Replace `scriptPreprocessor` config with `transform`.
* Also remove `moduleFileExtensions` which has been redundant since 16.0
  (`['js', 'json', 'jsx', 'node’]` is the default)
2016-11-21 23:00:39 +02:00
Vadzim
8a5c50d97a Fixes https://github.com/facebookincubator/create-react-app/issues/952 (#953) 2016-10-28 13:51:56 +01:00
Patrick Mackinder
a0efbebee2 Add collectCoverageFrom option to collect coverage on files without any tests. (#961) 2016-10-28 13:47:08 +01:00
Chase Colman
3539d0401a Upgrade to Jest 16 (#858)
* Update react-scripts dependencies to use jest 16

* Remove testRegex from Jest config (now default)
2016-10-11 12:38:12 +01:00
Boris Serdiuk
15c20f1729 load setupTests file at setupTestFramework stage (#846)
fixes facebookincubator/create-react-app#824
2016-10-05 12:18:04 +01:00
Dan Abramov
e5bf5af296 Extract some utilities into a separate package (#723)
* Extract some utilities into a separate package

* Add utils dir to `files` in package.json

* Do not create an empty `utils` dir on eject
2016-09-23 20:53:08 +01:00