Commit Graph

9 Commits

Author SHA1 Message Date
Christoph Pojer 4d5ef76b1a Add missing slash.
Summary:
This should be there for consistency.
Closes https://github.com/facebook/react-native/pull/11357

Differential Revision: D4294530

Pulled By: kentaromiura

fbshipit-source-id: 6219a7c69a65dde21d96bc032fc9a327386a85ca
2016-12-07 20:58:30 -08:00
Loic CHOLLIER 30152ff5b4 Adds native to the list of jest-react-native platforms to fix testing with react-relay.
Summary:
See https://github.com/facebook/jest/pull/2170. Per cpojer's request, bringing this PR to react-native as well.

**Summary**

When using jest with React Native and Relay and recommended default settings, jest throws :
```
    Cannot find module 'react-dom' from 'relayUnstableBatchedUpdates.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:151:17)
      at Object.<anonymous> (node_modules/react-relay/lib/relayUnstableBatchedUpdates.js:15:18)
      at new RelayEnvironment (node_modules/react-relay/lib/RelayEnvironment.js:39:63)
```

Investigating this, I found out that https://github.com/facebook/jest/blob/master/packages/jest-react-native/jest-preset.json didn't have "native" in the list of platforms, hence jest can't pick up `relayUnstableBatchedUpdates.native.js` in react-relay.

**Test plan**

I copied and paste the content of https://github.com/facebook/jest/blob/master/packages/jest-react-native/jest-preset.json in my `package.json` `jest` section, as well a
Closes https://github.com/facebook/react-native/pull/11179

Differential Revision: D4243073

Pulled By: cpojer

fbshipit-source-id: bcfeb2235df4d466ba19d0a3fe94fc98835a20ea
2016-11-28 21:28:28 -08:00
David Aurelio ca58e0af82 BREAKING kill deprecated asset support
Summary:
This removes support for `require('image!…')`, which has been deprecated for a long time.

It is still possible to use images that are already bundled by the native app using the `nativeImageSource` module.
Check http://facebook.github.io/react-native/docs/images.html for detailed documentation.

Reviewed By: matryoshcow

Differential Revision: D4231208

fbshipit-source-id: 05ec4c1ca0fabdc3fbb652f8ad1acdf240a67955
2016-11-24 05:43:38 -08:00
Christoph Pojer 3bd949cac7 Update Jest + jest-haste-map
Reviewed By: voideanvalue

Differential Revision: D4180887

fbshipit-source-id: f6ee6901e63206824f0639c81b64167b66da2168
2016-11-15 06:58:45 -08:00
Konstantin Raev 015a497cf1 Revert D4149694: [RN] Update Jest + jest-haste-map
Differential Revision: D4149694

fbshipit-source-id: 65a39bc1d0a0f9e7094ebc8dec9233e432a5e14d
2016-11-14 12:43:51 -08:00
Christoph Pojer 2382ffe9bc Update Jest + jest-haste-map
Reviewed By: matryoshcow

Differential Revision: D4149694

fbshipit-source-id: 4f8378c419ddc7978e05dfcf2112e833775391be
2016-11-10 06:28:38 -08:00
kentaromiura 97d90a1d71 Add `React` name mapping to the preset
Summary:
Fixes breakage on https://circleci.com/gh/facebook/react-native/12763 after the upgrade of React

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Jest preset has been upgraded so that requiring `React` capitalized can be possible

**Test plan (required)**

Couldn't reproduce it locally, we need to see if Circle passes.
Closes https://github.com/facebook/react-native/pull/10749

Differential Revision: D4132150

Pulled By: bestander

fbshipit-source-id: e41fb95b6677113fc6a3bf8bbce9247f59aa81dd
2016-11-04 20:43:43 -07:00
David Aurelio 3683beb88a RN: Update React (2/2)
Reviewed By: kentaromiura

Differential Revision: D4026114

fbshipit-source-id: 67808af91454d95941fea01eef58a4d9086f46e1
2016-11-04 05:43:44 -07:00
Cristian Carlesso 6d3e074dd4 Adding Jest preset so that people can configure Jest using react-native as preset
Reviewed By: cpojer

Differential Revision: D4081817

fbshipit-source-id: 43cf2ec467ea69651705162b6a58e0b3f1ad1dbf
2016-10-31 12:58:35 -07:00