Commit Graph

20 Commits

Author SHA1 Message Date
Hedger Wang 2263cddd02 Enable ES7 async functions in jest
Reviewed By: voideanvalue

Differential Revision: D2840780

fb-gh-sync-id: b86eed0078115d41e4400074f41244e4ae688762
2016-01-21 11:19:32 -08:00
ahanriat a3706411ab Fix jest preprocessor script
Summary:
Related to #3999

There is an issue with the `preprocessor` script when using node >=5 as it uses npm 3. ~~There are (at least) two solutions, (I'm submitting the first one):~~
- ~~specify min required node version to 5.x and modify [this the preprocessor script](https://github.com/facebook/react-native/blob/0.16-stable/jestSupport/preprocessor.js#L29) to match npm 3 requirements~~
- ~~specifify node version >= 4.x and < 5.x and let the preprocessor script as it is~~

**EDIT**:
Using `require.resolve` will do the trick !

--
Thank you guys for this amazing project by the way ;)
Closes https://github.com/facebook/react-native/pull/4903

Reviewed By: svcscm

Differential Revision: D2838759

Pulled By: androidtrunkagent

fb-gh-sync-id: ebb12f225a519ea23afc4f013bb063a920193719
2016-01-18 06:03:37 -08:00
Christoph Pojer b84ad2ab0d Updates for haste2 inside of jest
Summary:
I'm working on deploying haste2 with jest. This updates all the files that require changes for this to work and they are backwards compatible with the current version of jest.

* package.json was just outdated. I think haste1's liberal handling with collisions made this a "non-issue"
* env.js didn't properly set up ErrorUtils, also unsure why that isn't a problem in jest right now already?
* some things were mocking things they shouldn't
* Because of the regex that matches against providesModule and System.import, it isn't possible to list module names more than once. We have multiple tests reusing the same providesModule ids and using System.import with modules that only exist virtually within that test. Splitting up the strings makes the regexes work (we do the same kind of splitting on www sometimes if we need to) and using different providesModule names in different test files fixes the problem. I think the BundlesLayoutIntegration-test is going to be deleted, so this doesn't even matter.

public

Reviewed By: voideanvalue

Differential Revision: D2809681

fb-gh-sync-id: 8fe6ed8b5a1be28ba141e9001de143e502693281
2016-01-08 06:52:29 -08:00
Christoph Pojer 3ff39870ce Update open source env
Summary:
We weren't exposing a mock for the batched bridge, which resulted in the WebSocket test failure but only in the open source copy of react-native.

public

Reviewed By: voideanvalue, vjeux

Differential Revision: D2782151

fb-gh-sync-id: e896097dd6060bc26963bc4c23db87b7277b3eba
2015-12-21 17:53:31 -08:00
David Aurelio 21bae9b294 Unbreak jest tests (and travis e2e tests)
Reviewed By: mkonicek

Differential Revision: D2652002

fb-gh-sync-id: 8aab8da47dd737acc4ee9acddc484bd3bbdf1184
2015-11-14 03:26:24 -08:00
Bhuwan Khattar aff4cfb3b3 Fix spacing
Reviewed By: cpojer

Differential Revision: D2568166

fb-gh-sync-id: 8cedfd49ae4ce0de57a4ff3b499057c748803bd3
2015-10-21 17:39:26 -07:00
Bhuwan Khattar 3a8f9e1080 split transformers
Reviewed By: martinbigio

Differential Revision: D2567545

fb-gh-sync-id: 2e6a341885c701c6a7da35830227dbff7705255c
2015-10-21 16:28:27 -07:00
cpojer 54b1402c43 Nuke unused scriptPreprocess file. 2015-10-21 15:25:11 -07:00
Christoph Pojer cee01bef4f Don't transform node_modules in open source
Summary: We aren't ignoring node_modules so we apply our transform on *all of them*.

See https://github.com/facebook/react-native/pull/2942 and https://github.com/facebook/react-native/issues/2939

@​public

Reviewed By: @vjeux

Differential Revision: D2467324
2015-09-22 12:13:38 -07:00
Christoph Pojer fa01b2e4cb Codemod tests to use top-level-requires
Reviewed By: @DmitrySoshnikov

Differential Revision: D2456250
2015-09-19 15:41:29 -07:00
Christoph Pojer 3fca7f4d7b inline requires + preprocessor updates
Reviewed By: @DmitrySoshnikov

Differential Revision: D2455903
2015-09-19 15:22:33 -07:00
Christopher Chedeau c95028b1df Delete setupEnvPolyfills.js which is no longer being used 2015-09-16 11:36:02 -07:00
facebook-github-bot-6 0d09f22dbf Get back 100% in sync with fb codebase 2015-09-16 10:30:53 -07:00
Tadeu Zagallo cf0e40ad3d [ReactNative] Fix MessageQueue-test on open source
Summary:
@public

Fix mocking on MessageQueue-test

Test Plan: Run the test
2015-06-18 08:56:33 -08:00
Christopher Chedeau 1db2f07192 Update jestSupport in preparation for upgrading jest to latest version 2015-05-13 13:23:43 -07:00
Christopher Chedeau 5baffa03fd Second Updates from Mon 23 Mar
- [ReactNative] Use deprecated ix in TabBarExample | Amjad Masad
- [ReactNative] Expanded license on obj-c files | Christopher Chedeau
- [ReactNative] Expanded license on js files | Christopher Chedeau
- [ReactNative] Fix React Devtools integration | Alex Kotliarskyi
- [Text] Account for font leading so descenders are not clipped | James Ide
- [ReactNative] Expanded license on js packager files | Christopher Chedeau
- more UIExplorer flow | Basil Hosmer
- [react-packager] Pick up package changes while running | Amjad Masad
- Added a graph view and a ReactNative metric that displays current queue and execution time for the JS thread. | Bryce Redd
- [ReactNative] Add NativeModules and DeviceEventEmitter to react-native exports | Alex Kotliarskyi
2015-03-23 15:07:33 -07:00
Christopher Chedeau 7060141247 Updates from Mon Mar 2
- [ReactNative] Move merge & mergeInto from downstream to vendor | Christopher Chedeau
- [ReactNative] Replace all the call sites of mergeInto by Object.assign | Christopher Chedeau
- [WIP] Migrated View Managers over to new architecture | Nick Lockwood
- [ReactNative] Replace all the call sites of copyProperties by Object.assign | Christopher Chedeau
- [ReactNative] Migrate navigator.geolocation to open source | Christopher Chedeau
- [ReactNative] Remove README.md, LICENSE and .travis.yml from fbobjc | Christopher Chedeau
- [react-packager] Better transform errors | Amjad Masad
- [React Native][react-packager] Fix test runner and fialing tests | Amjad Masad
2015-03-02 11:36:55 -08:00
Christopher Chedeau 9bebc7e519 Updates from Wed Feb 25
- [react-packager] Fix lint errors | Amjad Masad
- [react-packager] fix a typo s/pacakge/package | Chengyin Liu
- [react-packager] Fix jest tests | Amjad Masad
- [Image] Really improve the quality of mis-sized images w/trilinear filtering | James Ide
2015-03-02 10:42:31 -08:00
Spencer Ahrens eeb0bf145d Updates from Sun Feb 15
- [react-packager][streamline oss] Injectable transformer | Amjad Masad
2015-02-18 17:43:36 -08:00
Ben Alpert a15603d8f1 Initial commit 2015-01-29 17:10:49 -08:00